Class AuthenticatorAbstract

Abstract class with utitily functions for working with access tokens such as storage

Hierarchy (view full)

Constructors

Properties

_accessToken?: string
_authInProgress: boolean = true
_expires?: number

Accessors

  • get accessToken(): Promise<undefined | string>
  • Promise that will resolve with an access token if available or undefined otherwise. This will try to fetch a new access token if:

    • the class implements the fetchAccessToken method
    • no unexpired access token is stored in this class

    Returns Promise<undefined | string>

Methods

  • Puts an access token and the expiration time in storage for usage when calling Spinque Query API

    Parameters

    • accessToken: string
    • expiresIn: number

    Returns void