Class TokenRequestExtenstions
Extension methods to TokenRequest.
Inheritance
object
TokenRequestExtenstions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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. |
| System.Net.Http.HttpClient | httpClient | The HTTP client used to create an HTTP request. |
| string | tokenServerUrl | The token server URL. |
| System.Threading.CancellationToken | taskCancellationToken | Cancellation token to cancel operation. |
| Google.Apis.Util.IClock | clock | The clock which is used to set the Issued property. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<TResult><TokenResponse> | Token response with the new access token. |