• Version 5.0.2
  • Published
  • 145 kB
  • 1 dependency
  • MIT license


npm i @auth0/angular-jwt
yarn add @auth0/angular-jwt
pnpm add @auth0/angular-jwt


JSON Web Token helper library for Angular



variable JWT_OPTIONS

const JWT_OPTIONS: InjectionToken<unknown>;


    class JwtHelperService

    class JwtHelperService {}


      constructor(config?: any);

        property tokenGetter

        tokenGetter: () => string;

          method decodeToken

          decodeToken: <T = any>(token?: string) => T;

            method getAuthScheme

            getAuthScheme: (
            authScheme: Function | string | undefined,
            request: HttpRequest<any>
            ) => string;

              method getTokenExpirationDate

              getTokenExpirationDate: (token?: string) => Date | null;

                method isTokenExpired

                isTokenExpired: (token?: string, offsetSeconds?: number) => boolean;

                  method urlBase64Decode

                  urlBase64Decode: (str: string) => string;

                    class JwtInterceptor

                    class JwtInterceptor implements HttpInterceptor {}


                      constructor(config: any, jwtHelper: JwtHelperService, document: Document);

                        property allowedDomains

                        allowedDomains: (string | RegExp)[];

                          property authScheme

                          authScheme: string | ((request?: HttpRequest<any>) => string);

                            property disallowedRoutes

                            disallowedRoutes: (string | RegExp)[];

                              property headerName

                              headerName: string;

                                property jwtHelper

                                jwtHelper: JwtHelperService;

                                  property skipWhenExpired

                                  skipWhenExpired: boolean;

                                    property standardPorts

                                    standardPorts: string[];

                                      property throwNoTokenError

                                      throwNoTokenError: boolean;

                                        property tokenGetter

                                        tokenGetter: (
                                        request?: HttpRequest<any>
                                        ) => string | null | Promise<string | null>;

                                          method handleInterception

                                          handleInterception: (
                                          token: string | null,
                                          request: HttpRequest<any>,
                                          next: HttpHandler
                                          ) => Observable<HttpEvent<any>>;

                                            method intercept

                                            intercept: (
                                            request: HttpRequest<any>,
                                            next: HttpHandler
                                            ) => Observable<HttpEvent<any>>;

                                              method isAllowedDomain

                                              isAllowedDomain: (request: HttpRequest<any>) => boolean;

                                                method isDisallowedRoute

                                                isDisallowedRoute: (request: HttpRequest<any>) => boolean;

                                                  class JwtModule

                                                  class JwtModule {}


                                                    constructor(parentModule: JwtModule);

                                                      method forRoot

                                                      static forRoot: (options: JwtModuleOptions) => ModuleWithProviders<JwtModule>;


                                                        interface JwtConfig

                                                        interface JwtConfig {}

                                                          property allowedDomains

                                                          allowedDomains?: Array<string | RegExp>;

                                                            property authScheme

                                                            authScheme?: string | ((request?: HttpRequest<any>) => string);

                                                              property disallowedRoutes

                                                              disallowedRoutes?: Array<string | RegExp>;

                                                                property headerName

                                                                headerName?: string;

                                                                  property skipWhenExpired

                                                                  skipWhenExpired?: boolean;

                                                                    property throwNoTokenError

                                                                    throwNoTokenError?: boolean;

                                                                      property tokenGetter

                                                                      tokenGetter?: (
                                                                      request?: HttpRequest<any>
                                                                      ) => string | null | Promise<string | null>;

                                                                        interface JwtModuleOptions

                                                                        interface JwtModuleOptions {}

                                                                          property config

                                                                          config?: JwtConfig;

                                                                            property jwtOptionsProvider

                                                                            jwtOptionsProvider?: Provider;

                                                                              Package Files (5)

                                                                              Dependencies (1)

                                                                              Dev Dependencies (0)

                                                                              No dev dependencies.

                                                                              Peer Dependencies (1)


                                                                              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/@auth0/angular-jwt.

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