Skip to main content

DefaultParallelModelAuthentication.GetTokenAsync method

Returns a cached access token when it is still usable, or requests a new token.

public Task<string> GetTokenAsync(CancellationToken cancellationToken = default)
parameterdescription
cancellationTokenA token that can be used to cancel the operation.

Return Value​

A task that represents the asynchronous operation and returns the access token.

Remarks​

When automatic refresh is enabled, cached tokens are considered usable only before their proactive refresh threshold.

See Also​