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

Thread-safe OAuth 2.0 authorization code flow for an installed application that persists end-user credentials. More...

Inheritance diagram for Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp:
Google.Apis.Auth.OAuth2.IAuthorizationCodeInstalledApp

Public Member Functions

 AuthorizationCodeInstalledApp (IAuthorizationCodeFlow flow, ICodeReceiver codeReceiver)
 Constructs a new authorization code installed application with the given flow and code receiver. More...
 
async Task< UserCredentialAuthorizeAsync (string userId, CancellationToken taskCancellationToken)
 Asynchronously authorizes the installed application to access user's protected data. More...
 
bool ShouldRequestAuthorizationCode (TokenResponse token)
 Determines the need for retrieval of a new authorization code, based on the given token and the authorization code flow. More...
 

Properties

IAuthorizationCodeFlow Flow [get]
 Gets the authorization code flow. More...
 
ICodeReceiver CodeReceiver [get]
 Gets the code receiver which is responsible for receiving the authorization code. More...
 
- Properties inherited from Google.Apis.Auth.OAuth2.IAuthorizationCodeInstalledApp
IAuthorizationCodeFlow Flow [get]
 Gets the authorization code flow. More...
 
ICodeReceiver CodeReceiver [get]
 Gets the code receiver. More...
 

Detailed Description

Thread-safe OAuth 2.0 authorization code flow for an installed application that persists end-user credentials.

Incremental authorization (https://developers.google.com/+/web/api/rest/oauth) is currently not supported for Installed Apps.

Constructor & Destructor Documentation

Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.AuthorizationCodeInstalledApp ( IAuthorizationCodeFlow  flow,
ICodeReceiver  codeReceiver 
)
inline

Constructs a new authorization code installed application with the given flow and code receiver.

Member Function Documentation

async Task<UserCredential> Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.AuthorizeAsync ( string  userId,
CancellationToken  taskCancellationToken 
)
inline

Asynchronously authorizes the installed application to access user's protected data.

Parameters
userIdUser identifier
taskCancellationTokenCancellation token to cancel an operation
Returns
The user's credential

Implements Google.Apis.Auth.OAuth2.IAuthorizationCodeInstalledApp.

bool Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.ShouldRequestAuthorizationCode ( TokenResponse  token)
inline

Determines the need for retrieval of a new authorization code, based on the given token and the authorization code flow.

Property Documentation

ICodeReceiver Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.CodeReceiver
get

Gets the code receiver which is responsible for receiving the authorization code.

IAuthorizationCodeFlow Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.Flow
get

Gets the authorization code flow.


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