Class TokenRequestExtenstions (1.60.0)

public static class TokenRequestExtenstions

Extension methods to TokenRequest.

Inheritance

object > TokenRequestExtenstions

Namespace

GoogleApisAuthOAuth2Requests

Assembly

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
NameDescription
requestTokenRequest

The token request.

httpClientHttpClient

The HTTP client used to create an HTTP request.

tokenServerUrlstring

The token server URL.

taskCancellationTokenCancellationToken

Cancellation token to cancel operation.

clockIClock

The clock which is used to set the Issued property.

Returns
TypeDescription
TaskTokenResponse

Token response with the new access token.