• Version 3.0.5
  • Published
  • 6.09 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: Request): string | null;

              interface SecretOrKeyProvider

              interface SecretOrKeyProvider {}

                call signature

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

                  interface StrategyOptions

                  interface StrategyOptions {}

                    property algorithms

                    algorithms?: string[];

                      property audience

                      audience?: string;

                        property ignoreExpiration

                        ignoreExpiration?: boolean;

                          property issuer

                          issuer?: string;

                            property jsonWebTokenOptions

                            jsonWebTokenOptions?: VerifyOptions;

                              property jwtFromRequest

                              jwtFromRequest: JwtFromRequestFunction;

                                property passReqToCallback

                                passReqToCallback?: boolean;

                                  property secretOrKey

                                  secretOrKey?: string | Buffer;

                                    property secretOrKeyProvider

                                    secretOrKeyProvider?: SecretOrKeyProvider;

                                      interface VerifiedCallback

                                      interface VerifiedCallback {}

                                        call signature

                                        (error: any, user?: any, info?: any): void;

                                          interface VerifyCallback

                                          interface VerifyCallback {}

                                            call signature

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

                                              interface VerifyCallbackWithRequest

                                              interface VerifyCallbackWithRequest {}

                                                call signature

                                                (req: 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>