public static class TokenRequestExtenstions
Extension methods to TokenRequest.
Namespace
GoogleApisAuthOAuth2RequestsAssembly
Google.Apis.Auth.dll
Methods
ExecuteAsync(TokenRequest, HttpClient, string, CancellationToken, IClock)
public static Task<TokenResponse> ExecuteAsync(this TokenRequest request, HttpClient httpClient, string tokenServerUrl, CancellationToken taskCancellationToken, IClock clock)
Executes the token request in order to receive a TokenResponse. In case the token server returns an error, a TokenResponseException is thrown.
Parameters | |
---|---|
Name | Description |
request |
TokenRequest The token request. |
httpClient |
HttpClient The HTTP client used to create an HTTP request. |
tokenServerUrl |
string The token server URL. |
taskCancellationToken |
CancellationToken Cancellation token to cancel operation. |
clock |
IClock The clock which is used to set the Issued property. |
Returns | |
---|---|
Type | Description |
TaskTokenResponse |
Token response with the new access token. |