Class GoogleAuthorizationCodeFlow
Google specific authorization code flow which inherits from AuthorizationCodeFlow.
Inheritance
Inherited Members
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 |
---|---|
IEnumerable<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
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. |
CancellationToken | taskCancellationToken | Cancellation token to cancel operation. |
Returns
Type | Description |
---|---|
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 |
---|---|
bool |