Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • VeociAuth

Index

Constructors

constructor

  • new VeociAuth(instance: AxiosInstance, storage?: Storage): VeociAuth

Properties

Private _axiosInstance

_axiosInstance: AxiosInstance

Private Optional _onAuthStateChanged

_onAuthStateChanged: OnAuthStateChanged

Private Optional _storage

_storage: Storage

access_token

access_token: null

access_token_scope

access_token_scope: null

Private refreshTokenRequest

refreshTokenRequest: Promise<AxiosResponse> | null = null

Methods

forgotPassword

  • forgotPassword(username: string): Promise<void>

logout

  • logout(delayStateChange?: undefined | true | false): Promise<void | Function>
  • Parameters

    • Optional delayStateChange: undefined | true | false

    Returns Promise<void | Function>

onAuthStateChanged

parseAuthToken

  • parseAuthToken(token: string, refreshToken: string): undefined | string
  • Parameters

    • token: string
    • refreshToken: string

    Returns undefined | string

parseLoginResponse

  • parseLoginResponse(response: AxiosResponse): AxiosResponse<any>
  • Strips out the auth tokens and inserts them into localstorage

    Parameters

    • response: AxiosResponse

    Returns AxiosResponse<any>

refreshTokens

  • refreshTokens(): Promise<AxiosResponse<any>>
  • Uses the refresh token to update both the access token and refresh token

    Returns Promise<AxiosResponse<any>>

resetExpiredPassword

  • resetExpiredPassword(userId: string, newPass: string): Promise<any>
  • Parameters

    • userId: string
    • newPass: string

    Returns Promise<any>

signInWithEmailAndPassword

  • signInWithEmailAndPassword(email: string, password: string, grantType?: String): Promise<any>
  • Parameters

    • email: string
    • password: string
    • Optional grantType: String

    Returns Promise<any>

signInWithMFA

  • signInWithMFA(mfa: string, rememberMe: boolean, grantType?: String): Promise<any>
  • Parameters

    • mfa: string
    • rememberMe: boolean
    • Optional grantType: String

    Returns Promise<any>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc