Class TokenRequestExtenstions
Extension methods to TokenRequest.
Inheritance
System.Object
TokenRequestExtenstions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.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. |
System.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<TokenResponse> | Token response with the new access token. |