@nebular/auth

  • Version 8.0.0
  • Published
  • 719 kB
  • No dependencies
  • MIT license

Install

npm i @nebular/auth
yarn add @nebular/auth
pnpm add @nebular/auth

Overview

@nebular/auth

Index

Variables

Functions

Classes

Interfaces

Enums

Type Aliases

Variables

variable auth2StrategyOptions

const auth2StrategyOptions: NbOAuth2AuthStrategyOptions;

    variable defaultAuthOptions

    const defaultAuthOptions: any;

      variable dummyStrategyOptions

      const dummyStrategyOptions: NbDummyAuthStrategyOptions;

        variable NB_AUTH_FALLBACK_TOKEN

        const NB_AUTH_FALLBACK_TOKEN: any;

          variable NB_AUTH_INTERCEPTOR_HEADER

          const NB_AUTH_INTERCEPTOR_HEADER: any;

            variable NB_AUTH_OPTIONS

            const NB_AUTH_OPTIONS: any;

              variable NB_AUTH_STRATEGIES

              const NB_AUTH_STRATEGIES: any;

                variable NB_AUTH_TOKEN_INTERCEPTOR_FILTER

                const NB_AUTH_TOKEN_INTERCEPTOR_FILTER: any;

                  variable NB_AUTH_TOKENS

                  const NB_AUTH_TOKENS: any;

                    variable NB_AUTH_USER_OPTIONS

                    const NB_AUTH_USER_OPTIONS: any;

                      variable passwordStrategyOptions

                      const passwordStrategyOptions: NbPasswordAuthStrategyOptions;

                        variable routes

                        const routes: any;

                          Functions

                          function b64decode

                          b64decode: (str: string) => string;

                            function b64DecodeUnicode

                            b64DecodeUnicode: (str: any) => string;

                              function decodeJwtPayload

                              decodeJwtPayload: (payload: string) => any;

                                function deepExtend

                                deepExtend: (...objects: any[]) => any;
                                • Extending object that entered in first argument.

                                  Returns extended object or false if have no target object or incorrect type.

                                  If you wish to clone source object (without modify it), just use empty new object as first argument, like this: deepExtend({}, yourObj_1, [yourObj_N]);

                                function getDeepFromObject

                                getDeepFromObject: (object: {}, name: string, defaultValue?: any) => any;

                                  function nbAuthCreateToken

                                  nbAuthCreateToken: <T extends NbAuthToken>(
                                  tokenClass: NbAuthTokenClass<T>,
                                  token: any,
                                  ownerStrategyName: string,
                                  createdAt?: Date
                                  ) => T;

                                    function nbNoOpInterceptorFilter

                                    nbNoOpInterceptorFilter: (req: any) => boolean;

                                      function nbOptionsFactory

                                      nbOptionsFactory: (options: any) => any;

                                        function nbStrategiesFactory

                                        nbStrategiesFactory: (options: NbAuthOptions, injector: any) => NbAuthStrategy[];

                                          function nbTokensFactory

                                          nbTokensFactory: (strategies: NbAuthStrategy[]) => NbAuthTokenClass[];

                                            function urlBase64Decode

                                            urlBase64Decode: (str: string) => string;

                                              Classes

                                              class NbAuthBlockComponent

                                              class NbAuthBlockComponent {}
                                              • Copyright Akveo. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information.

                                              class NbAuthComponent

                                              class NbAuthComponent implements OnDestroy {}

                                                constructor

                                                constructor(auth: NbAuthService, location: any);

                                                  property auth

                                                  protected auth: NbAuthService;

                                                    property authenticated

                                                    authenticated: boolean;

                                                      property location

                                                      protected location: any;

                                                        property subscription

                                                        subscription: any;

                                                          property token

                                                          token: string;

                                                            method back

                                                            back: () => boolean;

                                                              method ngOnDestroy

                                                              ngOnDestroy: () => void;

                                                                class NbAuthEmptyTokenError

                                                                class NbAuthEmptyTokenError extends NbAuthIllegalTokenError {}

                                                                  constructor

                                                                  constructor(message: string);

                                                                    class NbAuthIllegalJWTTokenError

                                                                    class NbAuthIllegalJWTTokenError extends NbAuthIllegalTokenError {}

                                                                      constructor

                                                                      constructor(message: string);

                                                                        class NbAuthIllegalTokenError

                                                                        class NbAuthIllegalTokenError extends Error {}

                                                                          constructor

                                                                          constructor(message: string);

                                                                            class NbAuthJWTInterceptor

                                                                            class NbAuthJWTInterceptor implements HttpInterceptor {}

                                                                              constructor

                                                                              constructor(injector: any, filter: any);

                                                                                property authService

                                                                                readonly authService: NbAuthService;

                                                                                  property filter

                                                                                  protected filter: any;

                                                                                    method intercept

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

                                                                                      class NbAuthJWTToken

                                                                                      class NbAuthJWTToken extends NbAuthSimpleToken {}
                                                                                      • Wrapper for JWT token with additional methods.

                                                                                      property NAME

                                                                                      static NAME: string;

                                                                                        method getTokenExpDate

                                                                                        getTokenExpDate: () => Date;
                                                                                        • Returns expiration date

                                                                                          Returns

                                                                                          Date

                                                                                        method isValid

                                                                                        isValid: () => boolean;
                                                                                        • Is data expired

                                                                                          Returns

                                                                                          {boolean}

                                                                                        method parsePayload

                                                                                        protected parsePayload: () => void;
                                                                                        • Returns payload object

                                                                                          Returns

                                                                                          any

                                                                                        method prepareCreatedAt

                                                                                        protected prepareCreatedAt: (date: Date) => Date;
                                                                                        • for JWT token, the iat (issued at) field of the token payload contains the creation Date

                                                                                        class NbAuthModule

                                                                                        class NbAuthModule {}

                                                                                          method forRoot

                                                                                          static forRoot: (nbAuthOptions?: NbAuthOptions) => any;

                                                                                            class NbAuthOAuth2JWTToken

                                                                                            class NbAuthOAuth2JWTToken extends NbAuthOAuth2Token {}
                                                                                            • Wrapper for OAuth2 token embedding JWT tokens

                                                                                            property accessTokenPayload

                                                                                            protected accessTokenPayload: any;

                                                                                              property NAME

                                                                                              static NAME: string;

                                                                                                method getAccessTokenPayload

                                                                                                getAccessTokenPayload: () => any;
                                                                                                • Returns access token payload

                                                                                                  Returns

                                                                                                  any

                                                                                                method getTokenExpDate

                                                                                                getTokenExpDate: () => Date;
                                                                                                • Returns expiration date : - exp if set, - super.getExpDate() otherwise

                                                                                                  Returns

                                                                                                  Date

                                                                                                method isValid

                                                                                                isValid: () => boolean;
                                                                                                • Is token valid

                                                                                                  Returns

                                                                                                  {boolean}

                                                                                                method parseAccessTokenPayload

                                                                                                protected parseAccessTokenPayload: () => any;

                                                                                                  method parsePayload

                                                                                                  protected parsePayload: () => void;

                                                                                                    method prepareCreatedAt

                                                                                                    protected prepareCreatedAt: (date: Date) => Date;
                                                                                                    • for Oauth2 JWT token, the iat (issued at) field of the access_token payload

                                                                                                    class NbAuthOAuth2Token

                                                                                                    class NbAuthOAuth2Token extends NbAuthSimpleToken {}
                                                                                                    • Wrapper for OAuth2 token whose access_token is a JWT Token

                                                                                                    constructor

                                                                                                    constructor(
                                                                                                    data: string | { [key: string]: string | number },
                                                                                                    ownerStrategyName: string,
                                                                                                    createdAt?: Date
                                                                                                    );

                                                                                                      property NAME

                                                                                                      static NAME: string;

                                                                                                        method getRefreshToken

                                                                                                        getRefreshToken: () => string;
                                                                                                        • Returns the refresh token

                                                                                                          Returns

                                                                                                          string

                                                                                                        method getTokenExpDate

                                                                                                        getTokenExpDate: () => Date;
                                                                                                        • Returns expiration date

                                                                                                          Returns

                                                                                                          Date

                                                                                                        method getType

                                                                                                        getType: () => string;
                                                                                                        • Returns the token type

                                                                                                          Returns

                                                                                                          string

                                                                                                        method getValue

                                                                                                        getValue: () => string;
                                                                                                        • Returns the token value

                                                                                                          Returns

                                                                                                          string

                                                                                                        method isValid

                                                                                                        isValid: () => boolean;
                                                                                                        • Is data expired

                                                                                                          Returns

                                                                                                          {boolean}

                                                                                                        method parsePayload

                                                                                                        protected parsePayload: () => void;
                                                                                                        • Parses token payload

                                                                                                          Returns

                                                                                                          any

                                                                                                        method setRefreshToken

                                                                                                        setRefreshToken: (refreshToken: string) => void;
                                                                                                        • put refreshToken in the token payload

                                                                                                          Parameter refreshToken

                                                                                                        method toString

                                                                                                        toString: () => string;
                                                                                                        • Convert to string

                                                                                                          Returns

                                                                                                          {string}

                                                                                                        class NbAuthResult

                                                                                                        class NbAuthResult {}

                                                                                                          constructor

                                                                                                          constructor(
                                                                                                          success: boolean,
                                                                                                          response?: any,
                                                                                                          redirect?: any,
                                                                                                          errors?: any,
                                                                                                          messages?: any,
                                                                                                          token?: NbAuthToken
                                                                                                          );

                                                                                                            property errors

                                                                                                            protected errors: string[];

                                                                                                              property messages

                                                                                                              protected messages: string[];

                                                                                                                property redirect

                                                                                                                protected redirect?: any;

                                                                                                                  property response

                                                                                                                  protected response?: any;

                                                                                                                    property success

                                                                                                                    protected success: boolean;

                                                                                                                      property token

                                                                                                                      protected token: NbAuthToken;

                                                                                                                        method getErrors

                                                                                                                        getErrors: () => string[];

                                                                                                                          method getMessages

                                                                                                                          getMessages: () => string[];

                                                                                                                            method getRedirect

                                                                                                                            getRedirect: () => string;

                                                                                                                              method getResponse

                                                                                                                              getResponse: () => any;

                                                                                                                                method getToken

                                                                                                                                getToken: () => NbAuthToken;

                                                                                                                                  method isFailure

                                                                                                                                  isFailure: () => boolean;

                                                                                                                                    method isSuccess

                                                                                                                                    isSuccess: () => boolean;

                                                                                                                                      class NbAuthService

                                                                                                                                      class NbAuthService {}
                                                                                                                                      • Common authentication service. Should be used to as an interlayer between UI Components and Auth Strategy.

                                                                                                                                      constructor

                                                                                                                                      constructor(tokenService: NbTokenService, strategies: any);

                                                                                                                                        property strategies

                                                                                                                                        protected strategies: any;

                                                                                                                                          property tokenService

                                                                                                                                          protected tokenService: NbTokenService;

                                                                                                                                            method authenticate

                                                                                                                                            authenticate: (strategyName: string, data?: any) => any;
                                                                                                                                            • Authenticates with the selected strategy Stores received token in the token storage

                                                                                                                                              Example: authenticate('email', {email: 'email@example.com', password: 'test'})

                                                                                                                                              Parameter strategyName

                                                                                                                                              Parameter data

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method getStrategy

                                                                                                                                            protected getStrategy: (strategyName: string) => NbAuthStrategy;
                                                                                                                                            • Get registered strategy by name

                                                                                                                                              Example: getStrategy('email')

                                                                                                                                              Parameter provider

                                                                                                                                              Returns

                                                                                                                                              {NbAbstractAuthProvider}

                                                                                                                                            method getToken

                                                                                                                                            getToken: () => any;
                                                                                                                                            • Retrieves current authenticated token stored

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method isAuthenticated

                                                                                                                                            isAuthenticated: () => any;
                                                                                                                                            • Returns true if auth token is present in the token storage

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method isAuthenticatedOrRefresh

                                                                                                                                            isAuthenticatedOrRefresh: () => any;
                                                                                                                                            • Returns true if valid auth token is present in the token storage. If not, calls the strategy refreshToken, and returns isAuthenticated() if success, false otherwise

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method logout

                                                                                                                                            logout: (strategyName: string) => any;
                                                                                                                                            • Sign outs with the selected strategy Removes token from the token storage

                                                                                                                                              Example: logout('email')

                                                                                                                                              Parameter strategyName

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method onAuthenticationChange

                                                                                                                                            onAuthenticationChange: () => any;
                                                                                                                                            • Returns authentication status stream

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method onTokenChange

                                                                                                                                            onTokenChange: () => any;
                                                                                                                                            • Returns tokens stream

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method refreshToken

                                                                                                                                            refreshToken: (strategyName: string, data?: any) => any;
                                                                                                                                            • Sends a refresh token request Stores received token in the token storage

                                                                                                                                              Example: refreshToken('email', {token: token})

                                                                                                                                              Parameter strategyName

                                                                                                                                              Parameter data

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method register

                                                                                                                                            register: (strategyName: string, data?: any) => any;
                                                                                                                                            • Registers with the selected strategy Stores received token in the token storage

                                                                                                                                              Example: register('email', {email: 'email@example.com', name: 'Some Name', password: 'test'})

                                                                                                                                              Parameter strategyName

                                                                                                                                              Parameter data

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method requestPassword

                                                                                                                                            requestPassword: (strategyName: string, data?: any) => any;
                                                                                                                                            • Sends forgot password request to the selected strategy

                                                                                                                                              Example: requestPassword('email', {email: 'email@example.com'})

                                                                                                                                              Parameter strategyName

                                                                                                                                              Parameter data

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            method resetPassword

                                                                                                                                            resetPassword: (strategyName: string, data?: any) => any;
                                                                                                                                            • Tries to reset password with the selected strategy

                                                                                                                                              Example: resetPassword('email', {newPassword: 'test'})

                                                                                                                                              Parameter strategyName

                                                                                                                                              Parameter data

                                                                                                                                              Returns

                                                                                                                                              {Observable}

                                                                                                                                            class NbAuthSimpleInterceptor

                                                                                                                                            class NbAuthSimpleInterceptor implements HttpInterceptor {}

                                                                                                                                              constructor

                                                                                                                                              constructor(injector: any, headerName?: string);

                                                                                                                                                property authService

                                                                                                                                                readonly authService: NbAuthService;

                                                                                                                                                  property headerName

                                                                                                                                                  protected headerName: string;

                                                                                                                                                    method intercept

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

                                                                                                                                                      class NbAuthSimpleToken

                                                                                                                                                      class NbAuthSimpleToken extends NbAuthToken {}
                                                                                                                                                      • Wrapper for simple (text) token

                                                                                                                                                      constructor

                                                                                                                                                      constructor(token: any, ownerStrategyName: string, createdAt?: Date);

                                                                                                                                                        property createdAt

                                                                                                                                                        protected createdAt?: Date;

                                                                                                                                                          property NAME

                                                                                                                                                          static NAME: string;

                                                                                                                                                            property ownerStrategyName

                                                                                                                                                            protected readonly ownerStrategyName: string;

                                                                                                                                                              property token

                                                                                                                                                              protected readonly token: any;

                                                                                                                                                                method getCreatedAt

                                                                                                                                                                getCreatedAt: () => Date;
                                                                                                                                                                • Returns the token's creation date

                                                                                                                                                                  Returns

                                                                                                                                                                  {Date}

                                                                                                                                                                method getOwnerStrategyName

                                                                                                                                                                getOwnerStrategyName: () => string;

                                                                                                                                                                  method getValue

                                                                                                                                                                  getValue: () => string;
                                                                                                                                                                  • Returns the token value

                                                                                                                                                                    Returns

                                                                                                                                                                    string

                                                                                                                                                                  method isValid

                                                                                                                                                                  isValid: () => boolean;
                                                                                                                                                                  • Is non empty and valid

                                                                                                                                                                    Returns

                                                                                                                                                                    {boolean}

                                                                                                                                                                  method parsePayload

                                                                                                                                                                  protected parsePayload: () => any;

                                                                                                                                                                    method prepareCreatedAt

                                                                                                                                                                    protected prepareCreatedAt: (date: Date) => Date;

                                                                                                                                                                      method toString

                                                                                                                                                                      toString: () => string;
                                                                                                                                                                      • Validate value and convert to string, if value is not valid return empty string

                                                                                                                                                                        Returns

                                                                                                                                                                        {string}

                                                                                                                                                                      class NbAuthStrategy

                                                                                                                                                                      abstract class NbAuthStrategy {}

                                                                                                                                                                        property defaultOptions

                                                                                                                                                                        protected defaultOptions: NbAuthStrategyOptions;

                                                                                                                                                                          property options

                                                                                                                                                                          protected options: NbAuthStrategyOptions;

                                                                                                                                                                            method authenticate

                                                                                                                                                                            abstract authenticate: (data?: any) => any;

                                                                                                                                                                              method createFailResponse

                                                                                                                                                                              protected createFailResponse: (data?: any) => any;

                                                                                                                                                                                method createSuccessResponse

                                                                                                                                                                                protected createSuccessResponse: (data?: any) => any;

                                                                                                                                                                                  method createToken

                                                                                                                                                                                  createToken: <T extends NbAuthToken>(
                                                                                                                                                                                  value: any,
                                                                                                                                                                                  failWhenInvalidToken?: boolean
                                                                                                                                                                                  ) => T;

                                                                                                                                                                                    method getActionEndpoint

                                                                                                                                                                                    protected getActionEndpoint: (action: string) => string;

                                                                                                                                                                                      method getName

                                                                                                                                                                                      getName: () => string;

                                                                                                                                                                                        method getOption

                                                                                                                                                                                        getOption: (key: string) => any;

                                                                                                                                                                                          method logout

                                                                                                                                                                                          abstract logout: () => any;

                                                                                                                                                                                            method refreshToken

                                                                                                                                                                                            abstract refreshToken: (data?: any) => any;

                                                                                                                                                                                              method register

                                                                                                                                                                                              abstract register: (data?: any) => any;

                                                                                                                                                                                                method requestPassword

                                                                                                                                                                                                abstract requestPassword: (data?: any) => any;

                                                                                                                                                                                                  method resetPassword

                                                                                                                                                                                                  abstract resetPassword: (data?: any) => any;

                                                                                                                                                                                                    method setOptions

                                                                                                                                                                                                    setOptions: (options: any) => void;

                                                                                                                                                                                                      class NbAuthStrategyOptions

                                                                                                                                                                                                      class NbAuthStrategyOptions {}

                                                                                                                                                                                                        property name

                                                                                                                                                                                                        name: string;

                                                                                                                                                                                                          property token

                                                                                                                                                                                                          token?: NbStrategyToken;

                                                                                                                                                                                                            class NbAuthToken

                                                                                                                                                                                                            abstract class NbAuthToken {}

                                                                                                                                                                                                              property payload

                                                                                                                                                                                                              protected payload: any;

                                                                                                                                                                                                                method getCreatedAt

                                                                                                                                                                                                                abstract getCreatedAt: () => Date;

                                                                                                                                                                                                                  method getName

                                                                                                                                                                                                                  getName: () => string;

                                                                                                                                                                                                                    method getOwnerStrategyName

                                                                                                                                                                                                                    abstract getOwnerStrategyName: () => string;

                                                                                                                                                                                                                      method getPayload

                                                                                                                                                                                                                      getPayload: () => any;

                                                                                                                                                                                                                        method getValue

                                                                                                                                                                                                                        abstract getValue: () => string;

                                                                                                                                                                                                                          method isValid

                                                                                                                                                                                                                          abstract isValid: () => boolean;

                                                                                                                                                                                                                            method toString

                                                                                                                                                                                                                            abstract toString: () => string;

                                                                                                                                                                                                                              class NbAuthTokenNotFoundError

                                                                                                                                                                                                                              class NbAuthTokenNotFoundError extends Error {}

                                                                                                                                                                                                                                constructor

                                                                                                                                                                                                                                constructor(message: string);

                                                                                                                                                                                                                                  class NbAuthTokenParceler

                                                                                                                                                                                                                                  class NbAuthTokenParceler {}
                                                                                                                                                                                                                                  • Creates a token parcel which could be stored/restored

                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                  constructor(
                                                                                                                                                                                                                                  fallbackClass: NbAuthTokenClass<NbAuthToken>,
                                                                                                                                                                                                                                  tokenClasses: NbAuthTokenClass<NbAuthToken>[]
                                                                                                                                                                                                                                  );

                                                                                                                                                                                                                                    method getClassByName

                                                                                                                                                                                                                                    protected getClassByName: (name: any) => NbAuthTokenClass;

                                                                                                                                                                                                                                      method parseTokenPack

                                                                                                                                                                                                                                      protected parseTokenPack: (value: any) => NbTokenPack;

                                                                                                                                                                                                                                        method unwrap

                                                                                                                                                                                                                                        unwrap: (value: string) => NbAuthToken;

                                                                                                                                                                                                                                          method wrap

                                                                                                                                                                                                                                          wrap: (token: NbAuthToken) => string;

                                                                                                                                                                                                                                            class NbDummyAuthStrategy

                                                                                                                                                                                                                                            class NbDummyAuthStrategy extends NbAuthStrategy {}
                                                                                                                                                                                                                                            • Dummy auth strategy. Could be useful for auth setup when backend is not available yet.

                                                                                                                                                                                                                                              Strategy settings.

                                                                                                                                                                                                                                              export class NbDummyAuthStrategyOptions extends NbAuthStrategyOptions {
                                                                                                                                                                                                                                              name = 'dummy';
                                                                                                                                                                                                                                              token = {
                                                                                                                                                                                                                                              class: NbAuthSimpleToken,
                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                              delay? = 1000;
                                                                                                                                                                                                                                              alwaysFail? = false;
                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                            property defaultOptions

                                                                                                                                                                                                                                            protected defaultOptions: NbDummyAuthStrategyOptions;

                                                                                                                                                                                                                                              method authenticate

                                                                                                                                                                                                                                              authenticate: (data?: any) => any;

                                                                                                                                                                                                                                                method createDummyResult

                                                                                                                                                                                                                                                protected createDummyResult: (data?: any) => NbAuthResult;

                                                                                                                                                                                                                                                  method logout

                                                                                                                                                                                                                                                  logout: (data?: any) => any;

                                                                                                                                                                                                                                                    method refreshToken

                                                                                                                                                                                                                                                    refreshToken: (data?: any) => any;

                                                                                                                                                                                                                                                      method register

                                                                                                                                                                                                                                                      register: (data?: any) => any;

                                                                                                                                                                                                                                                        method requestPassword

                                                                                                                                                                                                                                                        requestPassword: (data?: any) => any;

                                                                                                                                                                                                                                                          method resetPassword

                                                                                                                                                                                                                                                          resetPassword: (data?: any) => any;

                                                                                                                                                                                                                                                            method setup

                                                                                                                                                                                                                                                            static setup: (
                                                                                                                                                                                                                                                            options: NbDummyAuthStrategyOptions
                                                                                                                                                                                                                                                            ) => [NbAuthStrategyClass, NbDummyAuthStrategyOptions];

                                                                                                                                                                                                                                                              class NbDummyAuthStrategyOptions

                                                                                                                                                                                                                                                              class NbDummyAuthStrategyOptions extends NbAuthStrategyOptions {}

                                                                                                                                                                                                                                                                property alwaysFail

                                                                                                                                                                                                                                                                alwaysFail?: boolean;

                                                                                                                                                                                                                                                                  property delay

                                                                                                                                                                                                                                                                  delay?: number;

                                                                                                                                                                                                                                                                    property token

                                                                                                                                                                                                                                                                    token?: NbStrategyToken;

                                                                                                                                                                                                                                                                      class NbLoginComponent

                                                                                                                                                                                                                                                                      class NbLoginComponent {}

                                                                                                                                                                                                                                                                        constructor

                                                                                                                                                                                                                                                                        constructor(service: NbAuthService, options: {}, cd: any, router: any);

                                                                                                                                                                                                                                                                          property cd

                                                                                                                                                                                                                                                                          protected cd: any;

                                                                                                                                                                                                                                                                            property errors

                                                                                                                                                                                                                                                                            errors: string[];

                                                                                                                                                                                                                                                                              property messages

                                                                                                                                                                                                                                                                              messages: string[];

                                                                                                                                                                                                                                                                                property options

                                                                                                                                                                                                                                                                                protected options: {};

                                                                                                                                                                                                                                                                                  property redirectDelay

                                                                                                                                                                                                                                                                                  redirectDelay: number;

                                                                                                                                                                                                                                                                                    property rememberMe

                                                                                                                                                                                                                                                                                    rememberMe: boolean;

                                                                                                                                                                                                                                                                                      property router

                                                                                                                                                                                                                                                                                      protected router: any;

                                                                                                                                                                                                                                                                                        property service

                                                                                                                                                                                                                                                                                        protected service: NbAuthService;

                                                                                                                                                                                                                                                                                          property showMessages

                                                                                                                                                                                                                                                                                          showMessages: any;
                                                                                                                                                                                                                                                                                            socialLinks: NbAuthSocialLink[];

                                                                                                                                                                                                                                                                                              property strategy

                                                                                                                                                                                                                                                                                              strategy: string;

                                                                                                                                                                                                                                                                                                property submitted

                                                                                                                                                                                                                                                                                                submitted: boolean;

                                                                                                                                                                                                                                                                                                  property user

                                                                                                                                                                                                                                                                                                  user: any;

                                                                                                                                                                                                                                                                                                    method getConfigValue

                                                                                                                                                                                                                                                                                                    getConfigValue: (key: string) => any;

                                                                                                                                                                                                                                                                                                      method login

                                                                                                                                                                                                                                                                                                      login: () => void;

                                                                                                                                                                                                                                                                                                        class NbLogoutComponent

                                                                                                                                                                                                                                                                                                        class NbLogoutComponent implements OnInit {}

                                                                                                                                                                                                                                                                                                          constructor

                                                                                                                                                                                                                                                                                                          constructor(service: NbAuthService, options: {}, router: any);

                                                                                                                                                                                                                                                                                                            property options

                                                                                                                                                                                                                                                                                                            protected options: {};

                                                                                                                                                                                                                                                                                                              property redirectDelay

                                                                                                                                                                                                                                                                                                              redirectDelay: number;

                                                                                                                                                                                                                                                                                                                property router

                                                                                                                                                                                                                                                                                                                protected router: any;

                                                                                                                                                                                                                                                                                                                  property service

                                                                                                                                                                                                                                                                                                                  protected service: NbAuthService;

                                                                                                                                                                                                                                                                                                                    property strategy

                                                                                                                                                                                                                                                                                                                    strategy: string;

                                                                                                                                                                                                                                                                                                                      method getConfigValue

                                                                                                                                                                                                                                                                                                                      getConfigValue: (key: string) => any;

                                                                                                                                                                                                                                                                                                                        method logout

                                                                                                                                                                                                                                                                                                                        logout: (strategy: string) => void;

                                                                                                                                                                                                                                                                                                                          method ngOnInit

                                                                                                                                                                                                                                                                                                                          ngOnInit: () => void;

                                                                                                                                                                                                                                                                                                                            class NbOAuth2AuthStrategy

                                                                                                                                                                                                                                                                                                                            class NbOAuth2AuthStrategy extends NbAuthStrategy {}
                                                                                                                                                                                                                                                                                                                            • OAuth2 authentication strategy.

                                                                                                                                                                                                                                                                                                                              Strategy settings:

                                                                                                                                                                                                                                                                                                                              export enum NbOAuth2ResponseType {
                                                                                                                                                                                                                                                                                                                              CODE = 'code',
                                                                                                                                                                                                                                                                                                                              TOKEN = 'token',
                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                              export enum NbOAuth2GrantType {
                                                                                                                                                                                                                                                                                                                              AUTHORIZATION_CODE = 'authorization_code',
                                                                                                                                                                                                                                                                                                                              PASSWORD = 'password',
                                                                                                                                                                                                                                                                                                                              REFRESH_TOKEN = 'refresh_token',
                                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                                              export class NbOAuth2AuthStrategyOptions {
                                                                                                                                                                                                                                                                                                                              name: string;
                                                                                                                                                                                                                                                                                                                              baseEndpoint?: string = '';
                                                                                                                                                                                                                                                                                                                              clientId: string = '';
                                                                                                                                                                                                                                                                                                                              clientSecret: string = '';
                                                                                                                                                                                                                                                                                                                              clientAuthMethod: string = NbOAuth2ClientAuthMethod.NONE;
                                                                                                                                                                                                                                                                                                                              redirect?: { success?: string; failure?: string } = {
                                                                                                                                                                                                                                                                                                                              success: '/',
                                                                                                                                                                                                                                                                                                                              failure: null,
                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                              defaultErrors?: any[] = ['Something went wrong, please try again.'];
                                                                                                                                                                                                                                                                                                                              defaultMessages?: any[] = ['You have been successfully authenticated.'];
                                                                                                                                                                                                                                                                                                                              authorize?: {
                                                                                                                                                                                                                                                                                                                              endpoint?: string;
                                                                                                                                                                                                                                                                                                                              redirectUri?: string;
                                                                                                                                                                                                                                                                                                                              responseType?: string;
                                                                                                                                                                                                                                                                                                                              requireValidToken: true,
                                                                                                                                                                                                                                                                                                                              scope?: string;
                                                                                                                                                                                                                                                                                                                              state?: string;
                                                                                                                                                                                                                                                                                                                              params?: { [key: string]: string };
                                                                                                                                                                                                                                                                                                                              } = {
                                                                                                                                                                                                                                                                                                                              endpoint: 'authorize',
                                                                                                                                                                                                                                                                                                                              responseType: NbOAuth2ResponseType.CODE,
                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                              token?: {
                                                                                                                                                                                                                                                                                                                              endpoint?: string;
                                                                                                                                                                                                                                                                                                                              grantType?: string;
                                                                                                                                                                                                                                                                                                                              requireValidToken: true,
                                                                                                                                                                                                                                                                                                                              redirectUri?: string;
                                                                                                                                                                                                                                                                                                                              scope?: string;
                                                                                                                                                                                                                                                                                                                              class: NbAuthTokenClass,
                                                                                                                                                                                                                                                                                                                              } = {
                                                                                                                                                                                                                                                                                                                              endpoint: 'token',
                                                                                                                                                                                                                                                                                                                              grantType: NbOAuth2GrantType.AUTHORIZATION_CODE,
                                                                                                                                                                                                                                                                                                                              class: NbAuthOAuth2Token,
                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                              refresh?: {
                                                                                                                                                                                                                                                                                                                              endpoint?: string;
                                                                                                                                                                                                                                                                                                                              grantType?: string;
                                                                                                                                                                                                                                                                                                                              scope?: string;
                                                                                                                                                                                                                                                                                                                              requireValidToken: true,
                                                                                                                                                                                                                                                                                                                              } = {
                                                                                                                                                                                                                                                                                                                              endpoint: 'token',
                                                                                                                                                                                                                                                                                                                              grantType: NbOAuth2GrantType.REFRESH_TOKEN,
                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                            constructor

                                                                                                                                                                                                                                                                                                                            constructor(http: any, route: any, window: any);

                                                                                                                                                                                                                                                                                                                              property clientAuthMethod

                                                                                                                                                                                                                                                                                                                              readonly clientAuthMethod: any;

                                                                                                                                                                                                                                                                                                                                property defaultOptions

                                                                                                                                                                                                                                                                                                                                protected defaultOptions: NbOAuth2AuthStrategyOptions;

                                                                                                                                                                                                                                                                                                                                  property http

                                                                                                                                                                                                                                                                                                                                  protected http: any;

                                                                                                                                                                                                                                                                                                                                    property redirectResultHandlers

                                                                                                                                                                                                                                                                                                                                    protected redirectResultHandlers: { [key: string]: Function };

                                                                                                                                                                                                                                                                                                                                      property redirectResults

                                                                                                                                                                                                                                                                                                                                      protected redirectResults: { [key: string]: Function };

                                                                                                                                                                                                                                                                                                                                        property responseType

                                                                                                                                                                                                                                                                                                                                        readonly responseType: any;

                                                                                                                                                                                                                                                                                                                                          property route

                                                                                                                                                                                                                                                                                                                                          protected route: any;

                                                                                                                                                                                                                                                                                                                                            property window

                                                                                                                                                                                                                                                                                                                                            protected window: any;

                                                                                                                                                                                                                                                                                                                                              method addCredentialsToParams

                                                                                                                                                                                                                                                                                                                                              protected addCredentialsToParams: (params: any) => any;

                                                                                                                                                                                                                                                                                                                                                method authenticate

                                                                                                                                                                                                                                                                                                                                                authenticate: (data?: any) => any;

                                                                                                                                                                                                                                                                                                                                                  method authorizeRedirect

                                                                                                                                                                                                                                                                                                                                                  protected authorizeRedirect: () => void;

                                                                                                                                                                                                                                                                                                                                                    method buildAuthHeader

                                                                                                                                                                                                                                                                                                                                                    protected buildAuthHeader: () => any;

                                                                                                                                                                                                                                                                                                                                                      method buildCodeRequestData

                                                                                                                                                                                                                                                                                                                                                      protected buildCodeRequestData: (code: string) => any;

                                                                                                                                                                                                                                                                                                                                                        method buildPasswordRequestData

                                                                                                                                                                                                                                                                                                                                                        protected buildPasswordRequestData: (
                                                                                                                                                                                                                                                                                                                                                        username: string,
                                                                                                                                                                                                                                                                                                                                                        password: string
                                                                                                                                                                                                                                                                                                                                                        ) => string;

                                                                                                                                                                                                                                                                                                                                                          method buildRedirectUrl

                                                                                                                                                                                                                                                                                                                                                          protected buildRedirectUrl: () => string;

                                                                                                                                                                                                                                                                                                                                                            method buildRefreshRequestData

                                                                                                                                                                                                                                                                                                                                                            protected buildRefreshRequestData: (token: NbAuthRefreshableToken) => any;

                                                                                                                                                                                                                                                                                                                                                              method cleanParams

                                                                                                                                                                                                                                                                                                                                                              protected cleanParams: (params: any) => any;

                                                                                                                                                                                                                                                                                                                                                                method createRefreshedToken

                                                                                                                                                                                                                                                                                                                                                                protected createRefreshedToken: (
                                                                                                                                                                                                                                                                                                                                                                res: any,
                                                                                                                                                                                                                                                                                                                                                                existingToken: NbAuthRefreshableToken,
                                                                                                                                                                                                                                                                                                                                                                requireValidToken: boolean
                                                                                                                                                                                                                                                                                                                                                                ) => NbAuthToken;

                                                                                                                                                                                                                                                                                                                                                                  method getAuthorizationResult

                                                                                                                                                                                                                                                                                                                                                                  getAuthorizationResult: () => any;

                                                                                                                                                                                                                                                                                                                                                                    method handleResponseError

                                                                                                                                                                                                                                                                                                                                                                    protected handleResponseError: (res: any) => any;

                                                                                                                                                                                                                                                                                                                                                                      method isRedirectResult

                                                                                                                                                                                                                                                                                                                                                                      protected isRedirectResult: () => any;

                                                                                                                                                                                                                                                                                                                                                                        method logout

                                                                                                                                                                                                                                                                                                                                                                        logout: () => any;

                                                                                                                                                                                                                                                                                                                                                                          method parseHashAsQueryParams

                                                                                                                                                                                                                                                                                                                                                                          protected parseHashAsQueryParams: (hash: string) => { [key: string]: string };

                                                                                                                                                                                                                                                                                                                                                                            method passwordToken

                                                                                                                                                                                                                                                                                                                                                                            passwordToken: (username: string, password: string) => any;

                                                                                                                                                                                                                                                                                                                                                                              method refreshToken

                                                                                                                                                                                                                                                                                                                                                                              refreshToken: (token: NbAuthRefreshableToken) => any;

                                                                                                                                                                                                                                                                                                                                                                                method register

                                                                                                                                                                                                                                                                                                                                                                                register: (data?: any) => any;

                                                                                                                                                                                                                                                                                                                                                                                  method requestPassword

                                                                                                                                                                                                                                                                                                                                                                                  requestPassword: (data?: any) => any;

                                                                                                                                                                                                                                                                                                                                                                                    method requestToken

                                                                                                                                                                                                                                                                                                                                                                                    protected requestToken: (code: string) => any;

                                                                                                                                                                                                                                                                                                                                                                                      method resetPassword

                                                                                                                                                                                                                                                                                                                                                                                      resetPassword: (data?: any) => any;

                                                                                                                                                                                                                                                                                                                                                                                        method setup

                                                                                                                                                                                                                                                                                                                                                                                        static setup: (
                                                                                                                                                                                                                                                                                                                                                                                        options: NbOAuth2AuthStrategyOptions
                                                                                                                                                                                                                                                                                                                                                                                        ) => [NbAuthStrategyClass, NbOAuth2AuthStrategyOptions];

                                                                                                                                                                                                                                                                                                                                                                                          method urlEncodeParameters

                                                                                                                                                                                                                                                                                                                                                                                          protected urlEncodeParameters: (params: any) => string;

                                                                                                                                                                                                                                                                                                                                                                                            class NbOAuth2AuthStrategyOptions

                                                                                                                                                                                                                                                                                                                                                                                            class NbOAuth2AuthStrategyOptions extends NbAuthStrategyOptions {}

                                                                                                                                                                                                                                                                                                                                                                                              property authorize

                                                                                                                                                                                                                                                                                                                                                                                              authorize?: {
                                                                                                                                                                                                                                                                                                                                                                                              endpoint?: string;
                                                                                                                                                                                                                                                                                                                                                                                              redirectUri?: string;
                                                                                                                                                                                                                                                                                                                                                                                              responseType?: string;
                                                                                                                                                                                                                                                                                                                                                                                              requireValidToken?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                              scope?: string;
                                                                                                                                                                                                                                                                                                                                                                                              state?: string;
                                                                                                                                                                                                                                                                                                                                                                                              params?: { [key: string]: string };
                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                property baseEndpoint

                                                                                                                                                                                                                                                                                                                                                                                                baseEndpoint?: string;

                                                                                                                                                                                                                                                                                                                                                                                                  property clientAuthMethod

                                                                                                                                                                                                                                                                                                                                                                                                  clientAuthMethod?: string;

                                                                                                                                                                                                                                                                                                                                                                                                    property clientId

                                                                                                                                                                                                                                                                                                                                                                                                    clientId: string;

                                                                                                                                                                                                                                                                                                                                                                                                      property clientSecret

                                                                                                                                                                                                                                                                                                                                                                                                      clientSecret?: string;

                                                                                                                                                                                                                                                                                                                                                                                                        property defaultErrors

                                                                                                                                                                                                                                                                                                                                                                                                        defaultErrors?: any[];

                                                                                                                                                                                                                                                                                                                                                                                                          property defaultMessages

                                                                                                                                                                                                                                                                                                                                                                                                          defaultMessages?: any[];

                                                                                                                                                                                                                                                                                                                                                                                                            property redirect

                                                                                                                                                                                                                                                                                                                                                                                                            redirect?: { success?: string; failure?: string };

                                                                                                                                                                                                                                                                                                                                                                                                              property refresh

                                                                                                                                                                                                                                                                                                                                                                                                              refresh?: {
                                                                                                                                                                                                                                                                                                                                                                                                              endpoint?: string;
                                                                                                                                                                                                                                                                                                                                                                                                              grantType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                              scope?: string;
                                                                                                                                                                                                                                                                                                                                                                                                              requireValidToken?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                                property token

                                                                                                                                                                                                                                                                                                                                                                                                                token?: {
                                                                                                                                                                                                                                                                                                                                                                                                                endpoint?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                grantType?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                redirectUri?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                scope?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                requireValidToken?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                class: NbAuthTokenClass;
                                                                                                                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                                                                                                                  class NbPasswordAuthStrategy

                                                                                                                                                                                                                                                                                                                                                                                                                  class NbPasswordAuthStrategy extends NbAuthStrategy {}
                                                                                                                                                                                                                                                                                                                                                                                                                  • The most common authentication provider for email/password strategy.

                                                                                                                                                                                                                                                                                                                                                                                                                    Strategy settings. Note, there is no need to copy over the whole object to change the settings you need. Also, this.getOption call won't work outside of the default options declaration (which is inside of the NbPasswordAuthStrategy class), so you have to replace it with a custom helper function if you need it.

                                                                                                                                                                                                                                                                                                                                                                                                                    export class NbPasswordAuthStrategyOptions extends NbAuthStrategyOptions {
                                                                                                                                                                                                                                                                                                                                                                                                                    name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                    baseEndpoint? = '/api/auth/';
                                                                                                                                                                                                                                                                                                                                                                                                                    login?: boolean | NbPasswordStrategyModule = {
                                                                                                                                                                                                                                                                                                                                                                                                                    alwaysFail: false,
                                                                                                                                                                                                                                                                                                                                                                                                                    endpoint: 'login',
                                                                                                                                                                                                                                                                                                                                                                                                                    method: 'post',
                                                                                                                                                                                                                                                                                                                                                                                                                    requireValidToken: true,
                                                                                                                                                                                                                                                                                                                                                                                                                    redirect: {
                                                                                                                                                                                                                                                                                                                                                                                                                    success: '/',
                                                                                                                                                                                                                                                                                                                                                                                                                    failure: null,
                                                                                                                                                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultErrors: ['Login/Email combination is not correct, please try again.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultMessages: ['You have been successfully logged in.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    register?: boolean | NbPasswordStrategyModule = {
                                                                                                                                                                                                                                                                                                                                                                                                                    alwaysFail: false,
                                                                                                                                                                                                                                                                                                                                                                                                                    endpoint: 'register',
                                                                                                                                                                                                                                                                                                                                                                                                                    method: 'post',
                                                                                                                                                                                                                                                                                                                                                                                                                    requireValidToken: true,
                                                                                                                                                                                                                                                                                                                                                                                                                    redirect: {
                                                                                                                                                                                                                                                                                                                                                                                                                    success: '/',
                                                                                                                                                                                                                                                                                                                                                                                                                    failure: null,
                                                                                                                                                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultErrors: ['Something went wrong, please try again.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultMessages: ['You have been successfully registered.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    requestPass?: boolean | NbPasswordStrategyModule = {
                                                                                                                                                                                                                                                                                                                                                                                                                    endpoint: 'request-pass',
                                                                                                                                                                                                                                                                                                                                                                                                                    method: 'post',
                                                                                                                                                                                                                                                                                                                                                                                                                    redirect: {
                                                                                                                                                                                                                                                                                                                                                                                                                    success: '/',
                                                                                                                                                                                                                                                                                                                                                                                                                    failure: null,
                                                                                                                                                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultErrors: ['Something went wrong, please try again.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultMessages: ['Reset password instructions have been sent to your email.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    resetPass?: boolean | NbPasswordStrategyReset = {
                                                                                                                                                                                                                                                                                                                                                                                                                    endpoint: 'reset-pass',
                                                                                                                                                                                                                                                                                                                                                                                                                    method: 'put',
                                                                                                                                                                                                                                                                                                                                                                                                                    redirect: {
                                                                                                                                                                                                                                                                                                                                                                                                                    success: '/',
                                                                                                                                                                                                                                                                                                                                                                                                                    failure: null,
                                                                                                                                                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                                                                                                                                                    resetPasswordTokenKey: 'reset_password_token',
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultErrors: ['Something went wrong, please try again.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultMessages: ['Your password has been successfully changed.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    logout?: boolean | NbPasswordStrategyReset = {
                                                                                                                                                                                                                                                                                                                                                                                                                    alwaysFail: false,
                                                                                                                                                                                                                                                                                                                                                                                                                    endpoint: 'logout',
                                                                                                                                                                                                                                                                                                                                                                                                                    method: 'delete',
                                                                                                                                                                                                                                                                                                                                                                                                                    redirect: {
                                                                                                                                                                                                                                                                                                                                                                                                                    success: '/',
                                                                                                                                                                                                                                                                                                                                                                                                                    failure: null,
                                                                                                                                                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultErrors: ['Something went wrong, please try again.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultMessages: ['You have been successfully logged out.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    refreshToken?: boolean | NbPasswordStrategyModule = {
                                                                                                                                                                                                                                                                                                                                                                                                                    endpoint: 'refresh-token',
                                                                                                                                                                                                                                                                                                                                                                                                                    method: 'post',
                                                                                                                                                                                                                                                                                                                                                                                                                    requireValidToken: true,
                                                                                                                                                                                                                                                                                                                                                                                                                    redirect: {
                                                                                                                                                                                                                                                                                                                                                                                                                    success: null,
                                                                                                                                                                                                                                                                                                                                                                                                                    failure: null,
                                                                                                                                                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultErrors: ['Something went wrong, please try again.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    defaultMessages: ['Your token has been successfully refreshed.'],
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    token?: NbPasswordStrategyToken = {
                                                                                                                                                                                                                                                                                                                                                                                                                    class: NbAuthSimpleToken,
                                                                                                                                                                                                                                                                                                                                                                                                                    key: 'data.token',
                                                                                                                                                                                                                                                                                                                                                                                                                    getter: (module: string, res: HttpResponse<Object>, options: NbPasswordAuthStrategyOptions) => getDeepFromObject(
                                                                                                                                                                                                                                                                                                                                                                                                                    res.body,
                                                                                                                                                                                                                                                                                                                                                                                                                    options.token.key,
                                                                                                                                                                                                                                                                                                                                                                                                                    ),
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    errors?: NbPasswordStrategyMessage = {
                                                                                                                                                                                                                                                                                                                                                                                                                    key: 'data.errors',
                                                                                                                                                                                                                                                                                                                                                                                                                    getter: (module: string, res: HttpErrorResponse, options: NbPasswordAuthStrategyOptions) => getDeepFromObject(
                                                                                                                                                                                                                                                                                                                                                                                                                    res.error,
                                                                                                                                                                                                                                                                                                                                                                                                                    options.errors.key,
                                                                                                                                                                                                                                                                                                                                                                                                                    options[module].defaultErrors,
                                                                                                                                                                                                                                                                                                                                                                                                                    ),
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    messages?: NbPasswordStrategyMessage = {
                                                                                                                                                                                                                                                                                                                                                                                                                    key: 'data.messages',
                                                                                                                                                                                                                                                                                                                                                                                                                    getter: (module: string, res: HttpResponse<Object>, options: NbPasswordAuthStrategyOptions) => getDeepFromObject(
                                                                                                                                                                                                                                                                                                                                                                                                                    res.body,
                                                                                                                                                                                                                                                                                                                                                                                                                    options.messages.key,
                                                                                                                                                                                                                                                                                                                                                                                                                    options[module].defaultMessages,
                                                                                                                                                                                                                                                                                                                                                                                                                    ),
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    validation?: {
                                                                                                                                                                                                                                                                                                                                                                                                                    password?: {
                                                                                                                                                                                                                                                                                                                                                                                                                    required?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                    minLength?: number | null;
                                                                                                                                                                                                                                                                                                                                                                                                                    maxLength?: number | null;
                                                                                                                                                                                                                                                                                                                                                                                                                    regexp?: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    email?: {
                                                                                                                                                                                                                                                                                                                                                                                                                    required?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                    regexp?: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    fullName?: {
                                                                                                                                                                                                                                                                                                                                                                                                                    required?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                    minLength?: number | null;
                                                                                                                                                                                                                                                                                                                                                                                                                    maxLength?: number | null;
                                                                                                                                                                                                                                                                                                                                                                                                                    regexp?: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    };
                                                                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                                                                                                                                                                                                  constructor(http: any, route: any);

                                                                                                                                                                                                                                                                                                                                                                                                                    property defaultOptions

                                                                                                                                                                                                                                                                                                                                                                                                                    protected defaultOptions: NbPasswordAuthStrategyOptions;

                                                                                                                                                                                                                                                                                                                                                                                                                      property http

                                                                                                                                                                                                                                                                                                                                                                                                                      protected http: any;

                                                                                                                                                                                                                                                                                                                                                                                                                        method authenticate

                                                                                                                                                                                                                                                                                                                                                                                                                        authenticate: (data?: any) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                          method handleResponseError

                                                                                                                                                                                                                                                                                                                                                                                                                          protected handleResponseError: (res: any, module: string) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                            method logout

                                                                                                                                                                                                                                                                                                                                                                                                                            logout: () => any;

                                                                                                                                                                                                                                                                                                                                                                                                                              method refreshToken

                                                                                                                                                                                                                                                                                                                                                                                                                              refreshToken: (data?: any) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                method register

                                                                                                                                                                                                                                                                                                                                                                                                                                register: (data?: any) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                  method requestPassword

                                                                                                                                                                                                                                                                                                                                                                                                                                  requestPassword: (data?: any) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                    method resetPassword

                                                                                                                                                                                                                                                                                                                                                                                                                                    resetPassword: (data?: any) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                      method setup

                                                                                                                                                                                                                                                                                                                                                                                                                                      static setup: (
                                                                                                                                                                                                                                                                                                                                                                                                                                      options: NbPasswordAuthStrategyOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                      ) => [NbAuthStrategyClass, NbPasswordAuthStrategyOptions];

                                                                                                                                                                                                                                                                                                                                                                                                                                        class NbPasswordAuthStrategyOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                        class NbPasswordAuthStrategyOptions extends NbAuthStrategyOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                                                          property baseEndpoint

                                                                                                                                                                                                                                                                                                                                                                                                                                          baseEndpoint?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                            property errors

                                                                                                                                                                                                                                                                                                                                                                                                                                            errors?: NbPasswordStrategyMessage;

                                                                                                                                                                                                                                                                                                                                                                                                                                              property login

                                                                                                                                                                                                                                                                                                                                                                                                                                              login?: boolean | NbPasswordStrategyModule;

                                                                                                                                                                                                                                                                                                                                                                                                                                                property logout

                                                                                                                                                                                                                                                                                                                                                                                                                                                logout?: boolean | NbPasswordStrategyReset;

                                                                                                                                                                                                                                                                                                                                                                                                                                                  property messages

                                                                                                                                                                                                                                                                                                                                                                                                                                                  messages?: NbPasswordStrategyMessage;

                                                                                                                                                                                                                                                                                                                                                                                                                                                    property refreshToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                    refreshToken?: boolean | NbPasswordStrategyModule;

                                                                                                                                                                                                                                                                                                                                                                                                                                                      property register

                                                                                                                                                                                                                                                                                                                                                                                                                                                      register?: boolean | NbPasswordStrategyModule;

                                                                                                                                                                                                                                                                                                                                                                                                                                                        property requestPass

                                                                                                                                                                                                                                                                                                                                                                                                                                                        requestPass?: boolean | NbPasswordStrategyModule;

                                                                                                                                                                                                                                                                                                                                                                                                                                                          property resetPass

                                                                                                                                                                                                                                                                                                                                                                                                                                                          resetPass?: boolean | NbPasswordStrategyReset;

                                                                                                                                                                                                                                                                                                                                                                                                                                                            property token

                                                                                                                                                                                                                                                                                                                                                                                                                                                            token?: NbPasswordStrategyToken;

                                                                                                                                                                                                                                                                                                                                                                                                                                                              property validation

                                                                                                                                                                                                                                                                                                                                                                                                                                                              validation?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              password?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              required?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              minLength?: number | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              maxLength?: number | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              regexp?: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                                                                                                              email?: { required?: boolean; regexp?: string | null };
                                                                                                                                                                                                                                                                                                                                                                                                                                                              fullName?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                              required?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              minLength?: number | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              maxLength?: number | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              regexp?: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                              };
                                                                                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                class NbRegisterComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                class NbRegisterComponent {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  constructor(service: NbAuthService, options: {}, cd: any, router: any);

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property cd

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    protected cd: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property errors

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      errors: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property messages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        messages: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          protected options: {};

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property redirectDelay

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            redirectDelay: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property router

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              protected router: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property service

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                protected service: NbAuthService;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property showMessages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  showMessages: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    socialLinks: NbAuthSocialLink[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property strategy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      strategy: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property submitted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        submitted: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          user: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            method getConfigValue

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            getConfigValue: (key: string) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              method register

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              register: () => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                class NbRequestPasswordComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                class NbRequestPasswordComponent {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  constructor(service: NbAuthService, options: {}, cd: any, router: any);

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property cd

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    protected cd: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property errors

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      errors: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property messages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        messages: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          protected options: {};

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property redirectDelay

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            redirectDelay: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property router

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              protected router: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property service

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                protected service: NbAuthService;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property showMessages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  showMessages: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property strategy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    strategy: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property submitted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      submitted: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        user: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          method getConfigValue

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          getConfigValue: (key: string) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            method requestPass

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            requestPass: () => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              class NbResetPasswordComponent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              class NbResetPasswordComponent {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                constructor(service: NbAuthService, options: {}, cd: any, router: any);

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property cd

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  protected cd: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property errors

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    errors: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property messages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      messages: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        protected options: {};

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property redirectDelay

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          redirectDelay: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property router

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            protected router: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property service

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              protected service: NbAuthService;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property showMessages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                showMessages: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property strategy

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  strategy: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property submitted

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    submitted: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      user: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        method getConfigValue

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        getConfigValue: (key: string) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          method resetPass

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          resetPass: () => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            class NbTokenLocalStorage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            class NbTokenLocalStorage extends NbTokenStorage {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Service that uses browser localStorage as a storage.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The token storage is provided into auth module the following way:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              { provide: NbTokenStorage, useClass: NbTokenLocalStorage },

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              If you need to change the storage behaviour or provide your own - just extend your class from basic NbTokenStorage or NbTokenLocalStorage and provide in your app.module:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              { provide: NbTokenStorage, useClass: NbTokenCustomStorage },

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            constructor(parceler: NbAuthTokenParceler);

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property key

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              protected key: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                clear: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Clears token from localStorage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method get

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                get: () => NbAuthToken;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Returns token from localStorage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  {NbAuthToken}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                set: (token: NbAuthToken) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sets token to localStorage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter token

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                class NbTokenService

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                class NbTokenService {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Service that allows you to manage authentication token - get, set, clear and also listen to token changes over time.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                constructor(tokenStorage: NbTokenStorage);

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property token$

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  protected token$: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property tokenStorage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    protected tokenStorage: NbTokenStorage;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      method clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      clear: () => any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Removes the token and published token value

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Returns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        {Observable}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      method get

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      get: () => any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Returns observable of current token

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Returns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        {Observable}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      method publishStoredToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      protected publishStoredToken: () => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        method set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        set: (token: NbAuthToken) => any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Sets a token into the storage. This method is used by the NbAuthService automatically.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Parameter token

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Returns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          {Observable}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        method tokenChange

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        tokenChange: () => any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Publishes token when it changes.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Returns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          {Observable}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        class NbTokenStorage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        abstract class NbTokenStorage {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          method clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          abstract clear: () => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            method get

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            abstract get: () => NbAuthToken;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              method set

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              abstract set: (token: NbAuthToken) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                class NbUser

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                class NbUser {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  constructor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  constructor(
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  id?: number,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  email?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  password?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  rememberMe?: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  terms?: boolean,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  confirmPassword?: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  fullName?: string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  );

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property confirmPassword

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    confirmPassword?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property email

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      email?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property fullName

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        fullName?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property id

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          id?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property password

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            password?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property rememberMe

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              rememberMe?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property terms

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                terms?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Interfaces

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  interface NbAuthOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  interface NbAuthOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property forms

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    forms?: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property strategies

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      strategies?: NbAuthStrategies;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        interface NbAuthRefreshableToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        interface NbAuthRefreshableToken {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          method getRefreshToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          getRefreshToken: () => string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            method setRefreshToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            setRefreshToken: (refreshToken: string) => any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              interface NbAuthSocialLink {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property icon

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                icon?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  link?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property target

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    target?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property title

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      title?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property url

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        url?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface NbAuthTokenClass

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface NbAuthTokenClass<T = NbAuthToken> {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property NAME

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            NAME: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              construct signature

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              new (raw: any, strategyName: string, expDate?: Date): T;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface NbPasswordStrategyMessage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface NbPasswordStrategyMessage {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property getter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  getter?: Function;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property key

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    key?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface NbPasswordStrategyModule

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface NbPasswordStrategyModule {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property alwaysFail

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        alwaysFail?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property defaultErrors

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          defaultErrors?: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property defaultMessages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            defaultMessages?: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property endpoint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              endpoint?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property method

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property redirect

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  redirect?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  success?: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  failure?: string | null;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property requireValidToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    requireValidToken?: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface NbPasswordStrategyReset

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface NbPasswordStrategyReset extends NbPasswordStrategyModule {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property resetPasswordTokenKey

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        resetPasswordTokenKey?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface NbPasswordStrategyToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface NbPasswordStrategyToken {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property class

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            class?: NbAuthTokenClass;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property getter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              getter?: Function;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property key

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                key?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  interface NbStrategyToken

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  interface NbStrategyToken {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property class

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    class?: NbAuthTokenClass;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      index signature

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [key: string]: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        interface NbTokenPack

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        interface NbTokenPack {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property createdAt

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          createdAt: Number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property name

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            name: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property ownerStrategyName

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ownerStrategyName: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property value

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                value: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Enums

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  enum NbOAuth2ClientAuthMethod

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  enum NbOAuth2ClientAuthMethod {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  NONE = 'none',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  BASIC = 'basic',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  REQUEST_BODY = 'request-body',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member BASIC

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    BASIC = 'basic'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member NONE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      NONE = 'none'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        member REQUEST_BODY

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        REQUEST_BODY = 'request-body'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          enum NbOAuth2GrantType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          enum NbOAuth2GrantType {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          AUTHORIZATION_CODE = 'authorization_code',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          PASSWORD = 'password',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          REFRESH_TOKEN = 'refresh_token',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            member AUTHORIZATION_CODE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            AUTHORIZATION_CODE = 'authorization_code'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              member PASSWORD

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              PASSWORD = 'password'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                member REFRESH_TOKEN

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                REFRESH_TOKEN = 'refresh_token'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  enum NbOAuth2ResponseType

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  enum NbOAuth2ResponseType {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  CODE = 'code',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  TOKEN = 'token',
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    member CODE

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    CODE = 'code'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      member TOKEN

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      TOKEN = 'token'

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Type Aliases

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type NbAuthStrategies

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        type NbAuthStrategies = [NbAuthStrategyClass, NbAuthStrategyOptions][];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type NbAuthStrategyClass

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          type NbAuthStrategyClass = new (...params: any[]) => NbAuthStrategy;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Package Files (29)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Dev Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            No dev dependencies.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Peer Dependencies (6)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            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/@nebular/auth.

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