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