@auth0/angular-jwt

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

Install

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

Overview

JSON Web Token helper library for Angular

Index

Variables

variable JWT_OPTIONS

const JWT_OPTIONS: any;

    Classes

    class JwtHelperService

    class JwtHelperService {}

      constructor

      constructor(config?: any);

        property tokenGetter

        tokenGetter: () => string;

          method decodeToken

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

            method getAuthScheme

            getAuthScheme: (
            authScheme: Function | string | undefined,
            request: 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

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

                        property allowedDomains

                        allowedDomains: (string | RegExp)[];

                          property authScheme

                          authScheme: string | ((request?: 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?: any) => string | null | Promise<string | null>;

                                          method handleInterception

                                          handleInterception: (token: string | null, request: any, next: any) => any;

                                            method intercept

                                            intercept: (request: any, next: any) => any;

                                              method isAllowedDomain

                                              isAllowedDomain: (request: any) => boolean;

                                                method isDisallowedRoute

                                                isDisallowedRoute: (request: any) => boolean;

                                                  class JwtModule

                                                  class JwtModule {}

                                                    constructor

                                                    constructor(parentModule: JwtModule);

                                                      method forRoot

                                                      static forRoot: (options: JwtModuleOptions) => any;

                                                        Interfaces

                                                        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)

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

                                                                              • Markdown
                                                                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@auth0/angular-jwt)
                                                                              • 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>