AuthorizationClient Interface

Provides authorization to access APIs. Bentley's iTwin platform APIs use OAuth 2.0 for authorization. Implementations are provided for Electron, browsers, services, and command-line applications.

@see - IModelHostOptions.authorizationClient and IModelAppOptions.authorizationClient to configure the client.

@note Access tokens expire periodically and are automatically refreshed when possible; therefore, tokens should always be requested via the client, not cached for later reuse.

Methods

Name Description
getAccessToken(): Promise<string> Obtain an AccessToken for the currently authorized user, or blank string if no token is available.  

Defined in

Last Updated: 28 March, 2024