Class GoogleAuthorizationCodeFlow (1.55.0)

public class GoogleAuthorizationCodeFlow : AuthorizationCodeFlow, IHttpAuthorizationFlow, IAuthorizationCodeFlow, IDisposable

Google specific authorization code flow which inherits from AuthorizationCodeFlow.

Inheritance

Object > AuthorizationCodeFlow > GoogleAuthorizationCodeFlow

Namespace

Google.Apis.Auth.OAuth2.Flows

Assembly

Google.Apis.Auth.dll

Constructors

GoogleAuthorizationCodeFlow(GoogleAuthorizationCodeFlow.Initializer)

public GoogleAuthorizationCodeFlow(GoogleAuthorizationCodeFlow.Initializer initializer)

Constructs a new Google authorization code flow.

Parameter
NameDescription
initializerGoogleAuthorizationCodeFlow.Initializer

Fields

includeGrantedScopes

public readonly bool? includeGrantedScopes

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

Field Value
TypeDescription
Nullable<Boolean>

Properties

IncludeGrantedScopes

public bool? IncludeGrantedScopes { get; }

Gets the include granted scopes indicator.

Property Value
TypeDescription
Nullable<Boolean>

LoginHint

public string LoginHint { get; }

Gets the login_hint.

Property Value
TypeDescription
String

Nonce

public string Nonce { get; }

Gets the nonce.

Property Value
TypeDescription
String

ProjectId

public string ProjectId { get; }

The project ID associated with the credential using this flow.

Property Value
TypeDescription
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
TypeDescription
String

RevokeTokenUrl

public string RevokeTokenUrl { get; }

Gets the token revocation URL.

Property Value
TypeDescription
String

UserDefinedQueryParams

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

Gets the user defined query parameters.

Property Value
TypeDescription
IEnumerable<KeyValuePair<String, String>>

Methods

CreateAuthorizationCodeRequest(String)

public override AuthorizationCodeRequestUrl CreateAuthorizationCodeRequest(string redirectUri)

Creates an authorization code request with the specified redirect URI.

Parameter
NameDescription
redirectUriString
Returns
TypeDescription
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
NameDescription
userIdString

User identifier.

tokenString

Access token to be revoked.

taskCancellationTokenCancellationToken

Cancellation token to cancel operation.

Returns
TypeDescription
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
TypeDescription
Boolean
Overrides

Extension Method