diff --git a/jsonwebtoken/jsonwebtoken.d.ts b/jsonwebtoken/jsonwebtoken.d.ts index a047acf95c..75839b2d90 100644 --- a/jsonwebtoken/jsonwebtoken.d.ts +++ b/jsonwebtoken/jsonwebtoken.d.ts @@ -1,4 +1,4 @@ -// Type definitions for jsonwebtoken 0.4.0 +// Type definitions for jsonwebtoken 5.7.0 // Project: https://github.com/auth0/node-jsonwebtoken // Definitions by: Maxime LUCE , Daniel Heim // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -22,17 +22,20 @@ declare module "jsonwebtoken" { * - none: No digital signature or MAC value included */ algorithm?: string; - /** + /** *@deprecated - see expiresIn - *@member {number} - Lifetime for the token in minutes + *@member {number} - Lifetime for the token in minutes */ expiresInMinutes?: number; /** @member {string} - Lifetime for the token expressed in a string describing a time span [rauchg/ms](https://github.com/rauchg/ms.js). Eg: `60`, `"2 days"`, `"10h"`, `"7d"` */ expiresIn?: string; + notBefore?: string; audience?: string; subject?: string; issuer?: string; + jwtid?: string; noTimestamp?: boolean; + headers?: Object; } export interface VerifyOptions { @@ -40,6 +43,12 @@ declare module "jsonwebtoken" { audience?: string; issuer?: string; ignoreExpiration?: boolean; + ignoreNotBefore?: boolean; + subject?: string; + /** + *@deprecated + *@member {string} - Max age of token + */ maxAge?: string; } @@ -74,7 +83,7 @@ declare module "jsonwebtoken" { */ export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, callback: SignCallback): void; export function sign(payload: string | Buffer | Object, secretOrPrivateKey: string | Buffer, options: SignOptions, callback: SignCallback): void; - + /** * Synchronously verify given token using a secret or a public key to get a decoded token * @param {String} token - JWT string to verify