Class GoogleAuthorizationCodeFlow
Google specific authorization code flow which inherits from AuthorizationCodeFlow.
Inherited Members
Namespace: Google.Apis.Auth.OAuth2.Flows
Assembly: Google.Apis.Auth.dll
Syntax
public class GoogleAuthorizationCodeFlow : AuthorizationCodeFlow, IAuthorizationCodeFlow, IDisposable
Constructors
GoogleAuthorizationCodeFlow(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 |
---|---|
System.Nullable<System.Boolean> |
Properties
IncludeGrantedScopes
Gets the include granted scopes indicator.
Declaration
public bool? IncludeGrantedScopes { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
LoginHint
Gets the login_hint.
Declaration
public string LoginHint { get; }
Property Value
Type | Description |
---|---|
System.String |
Nonce
Gets the nonce.
Declaration
public string Nonce { get; }
Property Value
Type | Description |
---|---|
System.String |
ProjectId
The project ID associated with the credential using this flow.
Declaration
public string ProjectId { get; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.String |
RevokeTokenUrl
Gets the token revocation URL.
Declaration
public string RevokeTokenUrl { get; }
Property Value
Type | Description |
---|---|
System.String |
UserDefinedQueryParams
Gets the user defined query parameters.
Declaration
public IEnumerable<KeyValuePair<string, string>> UserDefinedQueryParams { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.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 |
---|---|---|
System.String | redirectUri |
Returns
Type | Description |
---|---|
AuthorizationCodeRequestUrl |
Overrides
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 |
---|---|---|
System.String | userId | User identifier. |
System.String | token | Access token to be revoked. |
System.Threading.CancellationToken | taskCancellationToken | Cancellation token to cancel operation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
|
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()
Indicates if a new token needs to be retrieved and stored regardless of normal circumstances.
Declaration
public override bool ShouldForceTokenRetrieval()
Returns
Type | Description |
---|---|
System.Boolean |