Skip to main content

DefaultParallelModelAuthentication.RefreshIfRejectedAsync method

Obtains a replacement token after a previously issued token has been rejected.

public Task<string> RefreshIfRejectedAsync(string rejectedToken,
CancellationToken cancellationToken = default)
parameterdescription
rejectedTokenThe access token that was rejected.
cancellationTokenA token that can be used to cancel the operation.

Return Value​

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

Exceptions​

exceptioncondition
ArgumentNullExceptionThe rejected token is null.
ArgumentExceptionThe rejected token is empty or consists only of white-space characters.

Remarks​

Reuses a different, unexpired cached token if another caller has already replaced the rejected token; otherwise requests a new token.

See Also​