public static class TokenRequestExtenstionsExtension methods to TokenRequest.
Namespace
Google.Apis.Auth.OAuth2.RequestsAssembly
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 | 
        TokenRequestThe token request.  | 
      
httpClient | 
        HttpClientThe HTTP client used to create an HTTP request.  | 
      
tokenServerUrl | 
        StringThe token server URL.  | 
      
taskCancellationToken | 
        CancellationTokenCancellation token to cancel operation.  | 
      
clock | 
        IClockThe clock which is used to set the Issued property.  | 
      
| Returns | |
|---|---|
| Type | Description | 
Task<TokenResponse> | 
        Token response with the new access token.  |