TokenCredential class

TokenCredential is a Credential used to generate a TokenCredentialPolicy. Renew token by setting a new token string value to token property.

Extends

Constructors

TokenCredential(string, string)

Creates an instance of TokenCredential.

Properties

clientId

Mutable client ID value. You can set a new ID value to this property, for example, when using a new token for another Azure Maps account.

token

Mutable token value. You can set a renewed token value to this property, for example, when an OAuth token is expired.

Methods

create(RequestPolicy, RequestPolicyOptions)

Creates a TokenCredentialPolicy object.

Constructor Details

TokenCredential(string, string)

Creates an instance of TokenCredential.

new TokenCredential(clientId: string, token: string)

Parameters

clientId

string

token

string

Property Details

clientId

Mutable client ID value. You can set a new ID value to this property, for example, when using a new token for another Azure Maps account.

clientId: string

Property Value

string

token

Mutable token value. You can set a renewed token value to this property, for example, when an OAuth token is expired.

token: string

Property Value

string

Method Details

create(RequestPolicy, RequestPolicyOptions)

Creates a TokenCredentialPolicy object.

function create(nextPolicy: RequestPolicy, options: RequestPolicyOptions)

Parameters

nextPolicy

RequestPolicy

options

RequestPolicyOptions

Returns