• Version 3.0.9
  • Published
  • 6.35 kB
  • 3 dependencies
  • MIT license


npm i @types/passport-jwt
yarn add @types/passport-jwt
pnpm add @types/passport-jwt


TypeScript definitions for passport-jwt



class Strategy

class Strategy extends PassportStrategy {}


    constructor(opt: StrategyOptions, verify: VerifyCallback);


      constructor(opt: StrategyOptions, verify: VerifyCallbackWithRequest);

        property name

        name: string;


          interface JwtFromRequestFunction

          interface JwtFromRequestFunction {}

            call signature

            (req: express.Request): string | null;

              interface SecretOrKeyProvider

              interface SecretOrKeyProvider {}

                call signature

                request: express.Request,
                rawJwtToken: any,
                done: (err: any, secretOrKey?: string | Buffer) => void
                ): void;

                  interface StrategyOptions

                  interface StrategyOptions {}

                    property algorithms

                    algorithms?: string[] | undefined;

                      property audience

                      audience?: string | string[] | undefined;

                        property ignoreExpiration

                        ignoreExpiration?: boolean | undefined;

                          property issuer

                          issuer?: string | string[] | undefined;

                            property jsonWebTokenOptions

                            jsonWebTokenOptions?: VerifyOptions | undefined;

                              property jwtFromRequest

                              jwtFromRequest: JwtFromRequestFunction;

                                property passReqToCallback

                                passReqToCallback?: boolean | undefined;

                                  property secretOrKey

                                  secretOrKey?: string | Buffer | undefined;

                                    property secretOrKeyProvider

                                    secretOrKeyProvider?: SecretOrKeyProvider | undefined;

                                      interface VerifiedCallback

                                      interface VerifiedCallback {}

                                        call signature

                                        (error: any, user?: Express.User | false, info?: any): void;

                                          interface VerifyCallback

                                          interface VerifyCallback {}

                                            call signature

                                            (payload: any, done: VerifiedCallback): void;

                                              interface VerifyCallbackWithRequest

                                              interface VerifyCallbackWithRequest {}

                                                call signature

                                                (req: express.Request, payload: any, done: VerifiedCallback): void;


                                                  namespace ExtractJwt

                                                  namespace ExtractJwt {}

                                                    function fromAuthHeader

                                                    fromAuthHeader: () => JwtFromRequestFunction;

                                                      function fromAuthHeaderAsBearerToken

                                                      fromAuthHeaderAsBearerToken: () => JwtFromRequestFunction;

                                                        function fromAuthHeaderWithScheme

                                                        fromAuthHeaderWithScheme: (auth_scheme: string) => JwtFromRequestFunction;

                                                          function fromBodyField

                                                          fromBodyField: (field_name: string) => JwtFromRequestFunction;

                                                            function fromExtractors

                                                            fromExtractors: (extractors: JwtFromRequestFunction[]) => JwtFromRequestFunction;

                                                              function fromHeader

                                                              fromHeader: (header_name: string) => JwtFromRequestFunction;

                                                                function fromUrlQueryParameter

                                                                fromUrlQueryParameter: (param_name: string) => JwtFromRequestFunction;

                                                                  Package Files (1)

                                                                  Dependencies (3)

                                                                  Dev Dependencies (0)

                                                                  No dev dependencies.

                                                                  Peer Dependencies (0)

                                                                  No peer dependencies.


                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/passport-jwt.

                                                                  • Markdown
                                                                  • HTML
                                                                    <a href="https://www.jsdocs.io/package/@types/passport-jwt"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>