Skip to content

Commit

Permalink
add SecretCallback[Long] back for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jfromaniello committed May 2, 2022
1 parent d3a8e80 commit c24078e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import expressUnless from 'express-unless';
import { UnauthorizedError } from './errors/UnauthorizedError';

export type GetVerificationKey = (req: express.Request, token: jwt.Jwt | undefined) => jwt.Secret | Promise<jwt.Secret>;

//deprecates key callback types for backward compatibility with v6
export type SecretCallback = GetVerificationKey;
export type SecretCallbackLong = GetVerificationKey;
//

export type IsRevoked = (req: express.Request, token: jwt.Jwt | undefined) => boolean | Promise<boolean>;
export type TokenGetter = (req: express.Request) => string | Promise<string> | undefined;

Expand Down

0 comments on commit c24078e

Please sign in to comment.