Options
All
  • Public
  • Public/Protected
  • All
Menu
since

0.0.1

classdesc

Authenticate using oAuth2.0

Hierarchy

  • default

Index

Constructors

constructor

  • new default(accessTokenUrl: string, _consumerKey: string, _consumerSecret: string): default
  • since

    0.0.1

    Parameters

    • accessTokenUrl: string

      URL to POST to get an access token

    • _consumerKey: string

      Consumer key to use to get access token

    • _consumerSecret: string

      Consumer secret to use to get access token

    Returns default

Properties

Private _accessToken

_accessToken: string

The access token

Private _accessTokenExpiresAt

_accessTokenExpiresAt: Date

Time and date of when the access token expires

Private _base64AuthString

_base64AuthString: string

Base64 encoded string with authentication credentials

accessTokenUrl

accessTokenUrl: string

Accessors

accessToken

  • get accessToken(): string

accessTokenExpiresAt

  • get accessTokenExpiresAt(): number
  • The time and date for when the access token expires in milliseconds

    Returns number

accessTokenIsValid

  • get accessTokenIsValid(): boolean
  • Whether the access token is valid or not

    Returns boolean

Methods

getAccessToken

  • getAccessToken(): Promise<string>
  • Get an access token

    since

    0.0.1

    method

    getAccessToken

    Returns Promise<string>

Generated using TypeDoc