DefaultParallelModelAuthentication.RefreshIfRejectedAsync method
Obtains a replacement token after a previously issued token has been rejected.
public Task<string> RefreshIfRejectedAsync(string rejectedToken,
CancellationToken cancellationToken = default)
| parameter | description |
|---|---|
| rejectedToken | The access token that was rejected. |
| cancellationToken | A token that can be used to cancel the operation. |
Return Value
A task that represents the asynchronous operation and returns the access token.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | The rejected token is null. |
| ArgumentException | The 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
- class DefaultParallelModelAuthentication
- namespace ParallelModel.Sdk.Authentication