Show / Hide Table of Contents

Class GoogleAuthorizationCodeFlow

Google specific authorization code flow which inherits from AuthorizationCodeFlow.

Inheritance
object
AuthorizationCodeFlow
GoogleAuthorizationCodeFlow
Implements
IAuthorizationCodeFlow
System.IDisposable
Inherited Members
AuthorizationCodeFlow.TokenServerUrl
AuthorizationCodeFlow.AuthorizationServerUrl
AuthorizationCodeFlow.ClientSecrets
AuthorizationCodeFlow.DataStore
AuthorizationCodeFlow.Scopes
AuthorizationCodeFlow.HttpClient
AuthorizationCodeFlow.AccessMethod
AuthorizationCodeFlow.Clock
AuthorizationCodeFlow.LoadTokenAsync(string, CancellationToken)
AuthorizationCodeFlow.DeleteTokenAsync(string, CancellationToken)
AuthorizationCodeFlow.ExchangeCodeForTokenAsync(string, string, string, CancellationToken)
AuthorizationCodeFlow.RefreshTokenAsync(string, string, CancellationToken)
AuthorizationCodeFlow.FetchTokenAsync(string, TokenRequest, CancellationToken)
AuthorizationCodeFlow.Dispose()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Auth.OAuth2.Flows
Assembly: Google.Apis.Auth.dll
Syntax
public class GoogleAuthorizationCodeFlow : AuthorizationCodeFlow, IAuthorizationCodeFlow, IDisposable

Constructors

GoogleAuthorizationCodeFlow(Initializer)

Constructs a new Google authorization code flow.

Declaration
public GoogleAuthorizationCodeFlow(GoogleAuthorizationCodeFlow.Initializer initializer)
Parameters
Type Name Description
GoogleAuthorizationCodeFlow.Initializer initializer

Fields

includeGrantedScopes

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

Declaration
public readonly bool? includeGrantedScopes
Field Value
Type Description
bool?

Properties

IncludeGrantedScopes

Gets the include granted scopes indicator.

Declaration
public bool? IncludeGrantedScopes { get; }
Property Value
Type Description
bool?

LoginHint

Gets the login_hint.

Declaration
public string LoginHint { get; }
Property Value
Type Description
string

Nonce

Gets the nonce.

Declaration
public string Nonce { get; }
Property Value
Type Description
string

ProjectId

The project ID associated with the credential using this flow.

Declaration
public string ProjectId { get; }
Property Value
Type Description
string

Prompt

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

Declaration
public string Prompt { get; }
Property Value
Type Description
string

RevokeTokenUrl

Gets the token revocation URL.

Declaration
public string RevokeTokenUrl { get; }
Property Value
Type Description
string

UserDefinedQueryParams

Gets the user defined query parameters.

Declaration
public IEnumerable<KeyValuePair<string, string>> UserDefinedQueryParams { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<T><KeyValuePair<string, string>>

Methods

CreateAuthorizationCodeRequest(string)

Creates an authorization code request with the specified redirect URI.

Declaration
public override AuthorizationCodeRequestUrl CreateAuthorizationCodeRequest(string redirectUri)
Parameters
Type Name Description
string redirectUri
Returns
Type Description
AuthorizationCodeRequestUrl
Overrides
AuthorizationCodeFlow.CreateAuthorizationCodeRequest(string)

RevokeTokenAsync(string, string, CancellationToken)

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.

Declaration
public override Task RevokeTokenAsync(string userId, string token, CancellationToken taskCancellationToken)
Parameters
Type Name Description
string userId

User identifier.

string token

Access token to be revoked.

System.Threading.CancellationToken taskCancellationToken

Cancellation token to cancel operation.

Returns
Type Description
System.Threading.Tasks.Task

true if the token was revoked successfully.

Overrides
AuthorizationCodeFlow.RevokeTokenAsync(string, string, CancellationToken)
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()

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

Declaration
public override bool ShouldForceTokenRetrieval()
Returns
Type Description
bool
Overrides
AuthorizationCodeFlow.ShouldForceTokenRetrieval()

Implements

IAuthorizationCodeFlow
System.IDisposable
In This Article
Back to top Generated by DocFX