Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • OAuth2Client

Index

Constructors

constructor

  • new OAuth2Client(clientId: string, region?: string): OAuth2Client

Properties

Private clientId

clientId: string

Private region

region: string

Private regions

regions: { AU: string; CA: string; EU: string; US: string } = ...

Type declaration

  • AU: string
  • CA: string
  • EU: string
  • US: string

Methods

Private attemptLogin

  • attemptLogin(url: string, auth: AuthInterface, client: AxiosInstance): Promise<string>

Private fetchAuthorizationCode

  • fetchAuthorizationCode(url: string, client: AxiosInstance): Promise<{ code: string; grantId: string }>
  • Fetch Code & Grant ID

    Parameters

    • url: string

      string

    • client: AxiosInstance

      AxiosInstance

    Returns Promise<{ code: string; grantId: string }>

    }

Private findRegexMatch

  • findRegexMatch(regex: RegExp, html: string): undefined | string

getAccessTokenFromCredentials

getAccessTokenFromRefreshToken

  • getAccessTokenFromRefreshToken(refreshToken: string): Promise<AccessToken>

Private getDefaultHeaders

  • getDefaultHeaders(): Promise<{}>

Private initalizeWebSession

  • initalizeWebSession(client: AxiosInstance, code_challenge: string): Promise<string>
  • Grab the authorized redirect link from the html page

    Parameters

    • client: AxiosInstance

      AxiosInstance

    • code_challenge: string

      string

    Returns Promise<string>

Private requestAccessToken

Generated using TypeDoc