@types/express-jwt

  • Version 6.0.1
  • Published
  • 5.92 kB
  • 2 dependencies
  • MIT license

Install

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

Overview

TypeScript definitions for express-jwt

Index

Functions

function jwt

jwt: typeof jwt;

    Classes

    class UnauthorizedError

    class UnauthorizedError extends Error {}

      constructor

      constructor(code: ErrorCode, error: { message: string });

        property code

        code: ErrorCode;

          property inner

          inner: { message: string };

            property message

            message: string;

              property name

              name: string;

                property status

                status: number;

                  Interfaces

                  interface GetTokenCallback

                  interface GetTokenCallback {}

                    call signature

                    (req: express.Request): any;

                      interface IsRevokedCallback

                      interface IsRevokedCallback {}

                        call signature

                        (
                        req: express.Request,
                        payload: any,
                        done: (err: any, revoked?: boolean) => void
                        ): void;

                          interface Options

                          interface Options {}

                            property algorithms

                            algorithms: string[];

                            property credentialsRequired

                            credentialsRequired?: boolean;

                              property getToken

                              getToken?: GetTokenCallback;

                                property isRevoked

                                isRevoked?: IsRevokedCallback;

                                  property requestProperty

                                  requestProperty?: string;

                                    property secret

                                    secret: secretType | SecretCallback | SecretCallbackLong;

                                      property userProperty

                                      userProperty?: string;

                                        index signature

                                        [property: string]: any;

                                          interface RequestHandler

                                          interface RequestHandler extends express.RequestHandler {}

                                            property unless

                                            unless: typeof unless;

                                              interface SecretCallback

                                              interface SecretCallback {}

                                                call signature

                                                (
                                                req: express.Request,
                                                payload: any,
                                                done: (err: any, secret?: secretType) => void
                                                ): void;

                                                  interface SecretCallbackLong

                                                  interface SecretCallbackLong {}

                                                    call signature

                                                    (
                                                    req: express.Request,
                                                    header: any,
                                                    payload: any,
                                                    done: (err: any, secret?: secretType) => void
                                                    ): void;

                                                      Type Aliases

                                                      type ErrorCode

                                                      type ErrorCode =
                                                      | 'revoked_token'
                                                      | 'invalid_token'
                                                      | 'credentials_bad_scheme'
                                                      | 'credentials_bad_format'
                                                      | 'credentials_required';

                                                        type secretType

                                                        type secretType = string | Buffer;

                                                          Namespaces

                                                          namespace global

                                                          namespace global {}

                                                            namespace global.Express

                                                            namespace global.Express {}

                                                              interface Request

                                                              interface Request {}

                                                                property user

                                                                user?: User;

                                                                  interface User

                                                                  interface User {}

                                                                    Package Files (1)

                                                                    Dependencies (2)

                                                                    Dev Dependencies (0)

                                                                    No dev dependencies.

                                                                    Peer Dependencies (0)

                                                                    No peer dependencies.

                                                                    Badge

                                                                    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/express-jwt.

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