Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AuthenticationClient

Client providing access to Autodesk Forge Authentication APIs.

link

https://forge.autodesk.com/en/docs/oauth/v2

Hierarchy

  • AuthenticationClient

Index

Constructors

constructor

  • new AuthenticationClient(clientId: string, clientSecret: string, host?: string): AuthenticationClient

Properties

Protected authProvider

authProvider: IAuthProvider

Protected clientId

clientId: string

Protected clientSecret

clientSecret: string

Protected host

host: string

Protected userProfileApi

userProfileApi: UserProfileApi

Methods

authenticate

  • authenticate(scopes: Scope[], force?: boolean): Promise<AuthToken>

getAuthorizationUrl

  • getAuthorizationUrl(scopes: Scope[], redirectUri: string): string

getToken

  • getToken(code: string, redirectUri: string): Promise<AuthToken>
  • Exchanges temporary code retrieved from 3-legged OAuth workflow for an access token.

    link

    https://forge.autodesk.com/en/docs/oauth/v2/reference/http/gettoken-POST

    async

    Parameters

    • code: string

      Temporary code returned from the 3-legged OAuth workflow.

    • redirectUri: string

      Callback URL. Must match the URL configured for this app on the Forge portal.

    Returns Promise<AuthToken>

    3-legged access token object.

getUserProfile

refreshToken

  • refreshToken(refreshToken: string, scopes: Scope[]): Promise<AuthToken>

Generated using TypeDoc