Class GoogleAuthorizationCodeFlow (1.60.0)

public class GoogleAuthorizationCodeFlow : AuthorizationCodeFlow, IAuthorizationCodeFlow, IDisposable

Google specific authorization code flow which inherits from AuthorizationCodeFlow.

Inheritance

object > AuthorizationCodeFlow > GoogleAuthorizationCodeFlow

Namespace

GoogleApisAuthOAuth2Flows

Assembly

Google.Apis.Auth.dll

Constructors

GoogleAuthorizationCodeFlow(Initializer)

public GoogleAuthorizationCodeFlow(GoogleAuthorizationCodeFlow.Initializer initializer)

Constructs a new Google authorization code flow.

Parameter
Name Description
initializer GoogleAuthorizationCodeFlowInitializer

Fields

includeGrantedScopes

public readonly bool? includeGrantedScopes

Gets the include granted scopes indicator. Do not use, use IncludeGrantedScopes instead.

Field Value
Type Description
bool

Properties

IncludeGrantedScopes

public bool? IncludeGrantedScopes { get; }

Gets the include granted scopes indicator.

Property Value
Type Description
bool

LoginHint

public string LoginHint { get; }

Gets the login_hint.

Property Value
Type Description
string

Nonce

public string Nonce { get; }

Gets the nonce.

Property Value
Type Description
string

ProjectId

public string ProjectId { get; }

The project ID associated with the credential using this flow.

Property Value
Type Description
string

Prompt

public string Prompt { get; }

Gets the prompt for consent behaviour. Value can be null, "none", "consent", or "select_account". See OpenIDConnect documentation for details.

Property Value
Type Description
string

RevokeTokenUrl

public string RevokeTokenUrl { get; }

Gets the token revocation URL.

Property Value
Type Description
string

UserDefinedQueryParams

public IEnumerable<KeyValuePair<string, string>> UserDefinedQueryParams { get; }

Gets the user defined query parameters.

Property Value
Type Description
IEnumerableKeyValuePairstringstring

Methods

CreateAuthorizationCodeRequest(string)

public override AuthorizationCodeRequestUrl CreateAuthorizationCodeRequest(string redirectUri)

Creates an authorization code request with the specified redirect URI.

Parameter
Name Description
redirectUri string
Returns
Type Description
AuthorizationCodeRequestUrl
Overrides

RevokeTokenAsync(string, string, CancellationToken)

public override Task RevokeTokenAsync(string userId, string token, CancellationToken taskCancellationToken)

Asynchronously revokes the specified token. This method disconnects the user's account from the OAuth 2.0 application. It should be called upon removing the user account from the site.

Parameters
Name Description
userId string

User identifier.

token string

Access token to be revoked.

taskCancellationToken CancellationToken

Cancellation token to cancel operation.

Returns
Type Description
Task

true if the token was revoked successfully.

Overrides Remarks

If revoking the token succeeds, the user's credential is removed from the data store and the user MUST authorize the application again before the application can access the user's private resources.

ShouldForceTokenRetrieval()

public override bool ShouldForceTokenRetrieval()

Indicates if a new token needs to be retrieved and stored regardless of normal circumstances.

Returns
Type Description
bool
Overrides

Extension Method