Google API Client Library for .NET  1.10.0
Classes | Public Member Functions | Public Attributes | Properties | List of all members
Google.Apis.Auth.OAuth2.Flows.GoogleAuthorizationCodeFlow Class Reference

Google specific authorization code flow which inherits from AuthorizationCodeFlow. More...

Inheritance diagram for Google.Apis.Auth.OAuth2.Flows.GoogleAuthorizationCodeFlow:
Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow Google.Apis.Auth.OAuth2.Flows.IAuthorizationCodeFlow

Classes

class  Initializer
 An initializer class for Google authorization code flow. More...
 

Public Member Functions

 GoogleAuthorizationCodeFlow (Initializer initializer)
 Constructs a new Google authorization code flow. More...
 
override
AuthorizationCodeRequestUrl 
CreateAuthorizationCodeRequest (string redirectUri)
 Creates an authorization code request with the specified redirect URI. More...
 
override async 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. More...
 
override bool ShouldForceTokenRetrieval ()
 Indicates if a new token needs to be retrieved and stored regardless of normal circumstances. More...
 
- Public Member Functions inherited from Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow
 AuthorizationCodeFlow (Initializer initializer)
 Constructs a new flow using the initializer's properties. More...
 
async Task< TokenResponseLoadTokenAsync (string userId, CancellationToken taskCancellationToken)
 Asynchronously loads the user's token using the flow's Google.Apis.Util.Store.IDataStore. More...
 
async Task DeleteTokenAsync (string userId, CancellationToken taskCancellationToken)
 Asynchronously deletes the user's token using the flow's Google.Apis.Util.Store.IDataStore. More...
 
async Task< TokenResponseExchangeCodeForTokenAsync (string userId, string code, string redirectUri, CancellationToken taskCancellationToken)
 Asynchronously exchanges code with a token. More...
 
async Task< TokenResponseRefreshTokenAsync (string userId, string refreshToken, CancellationToken taskCancellationToken)
 Asynchronously refreshes an access token using a refresh token. More...
 
async Task< TokenResponseFetchTokenAsync (string userId, TokenRequest request, CancellationToken taskCancellationToken)
 Retrieve a new token from the server using the specified request. More...
 
void Dispose ()
 

Public Attributes

readonly bool includeGrantedScopes
 

Properties

string RevokeTokenUrl [get]
 Gets the token revocation URL. More...
 
bool IncludeGrantedScopes [get]
 Gets or sets the include granted scopes indicator. More...
 
- Properties inherited from Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow
string TokenServerUrl [get]
 Gets the token server URL. More...
 
string AuthorizationServerUrl [get]
 Gets the authorization code server URL. More...
 
ClientSecrets ClientSecrets [get]
 Gets the client secrets which includes the client identifier and its secret. More...
 
IDataStore DataStore [get]
 Gets the data store used to store the credentials. More...
 
IEnumerable< string > Scopes [get]
 Gets the scopes which indicate the API access your application is requesting. More...
 
ConfigurableHttpClient HttpClient [get]
 Gets the HTTP client used to make authentication requests to the server. More...
 
IAccessMethod AccessMethod [get]
 
IClock Clock [get]
 
- Properties inherited from Google.Apis.Auth.OAuth2.Flows.IAuthorizationCodeFlow
IAccessMethod AccessMethod [get]
 Gets the method for presenting the access token to the resource server. More...
 
IClock Clock [get]
 Gets the clock. More...
 
IDataStore DataStore [get]
 Gets the data store used to store the credentials. More...
 

Detailed Description

Google specific authorization code flow which inherits from AuthorizationCodeFlow.

Constructor & Destructor Documentation

Google.Apis.Auth.OAuth2.Flows.GoogleAuthorizationCodeFlow.GoogleAuthorizationCodeFlow ( Initializer  initializer)
inline

Constructs a new Google authorization code flow.

Member Function Documentation

override AuthorizationCodeRequestUrl Google.Apis.Auth.OAuth2.Flows.GoogleAuthorizationCodeFlow.CreateAuthorizationCodeRequest ( string  redirectUri)
inlinevirtual

Creates an authorization code request with the specified redirect URI.

Reimplemented from Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.

override async Task Google.Apis.Auth.OAuth2.Flows.GoogleAuthorizationCodeFlow.RevokeTokenAsync ( string  userId,
string  token,
CancellationToken  taskCancellationToken 
)
inlinevirtual

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.

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.

Parameters
userIdUser identifier.
tokenAccess token to be revoked.
taskCancellationTokenCancellation token to cancel operation.
Returns
true if the token was revoked successfully.

Reimplemented from Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.

override bool Google.Apis.Auth.OAuth2.Flows.GoogleAuthorizationCodeFlow.ShouldForceTokenRetrieval ( )
inlinevirtual

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

Reimplemented from Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.

Property Documentation

bool Google.Apis.Auth.OAuth2.Flows.GoogleAuthorizationCodeFlow.IncludeGrantedScopes
get

Gets or sets the include granted scopes indicator.

string Google.Apis.Auth.OAuth2.Flows.GoogleAuthorizationCodeFlow.RevokeTokenUrl
get

Gets the token revocation URL.


The documentation for this class was generated from the following file: