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

OAuth 2.0 verification code receiver for Windows 8 application that opens an embedded Google account form to enter the user's credentials and accepts the application access to its token. More...

Inheritance diagram for Google.Apis.Auth.OAuth2.AuthorizationCodeBroker:
Google.Apis.Auth.OAuth2.ICodeReceiver Google.Apis.Auth.OAuth2.ICodeReceiver Google.Apis.Auth.OAuth2.ICodeReceiver

Public Member Functions

async Task
< AuthorizationCodeResponseUrl
ReceiveCodeAsync (AuthorizationCodeRequestUrl url, CancellationToken taskCancellationToken)
 Receives the authorization code. More...
 
async Task
< AuthorizationCodeResponseUrl
ReceiveCodeAsync (AuthorizationCodeRequestUrl url, CancellationToken taskCancellationToken)
 Receives the authorization code. More...
 
async Task
< AuthorizationCodeResponseUrl
ReceiveCodeAsync (AuthorizationCodeRequestUrl url, CancellationToken taskCancellationToken)
 Receives the authorization code. More...
 

Properties

string RedirectUri [get]
 
- Properties inherited from Google.Apis.Auth.OAuth2.ICodeReceiver
string RedirectUri [get]
 Gets the redirected URI. More...
 

Detailed Description

OAuth 2.0 verification code receiver for Windows 8 application that opens an embedded Google account form to enter the user's credentials and accepts the application access to its token.

OAuth 2.0 verification code receiver for Windows Phone 8.1 application that opens a Google account form so the users can enter their credentials and accept the application access to their token.

OAuth 2.0 verification code receiver for Windows Phone that opens an embedded Google account form to enter the user's credentials and accepts the application access to its token.

This broker's most important method is ReceiveCodeAsync(AuthorizationCodeRequestUrl,CancellationToken). The first time it is being called, it calls

WebAuthenticationBroker.AuthenticateAndContinue

so the users can authorize the app to access their private resources. While calling this method the app is suspended.

When the app is being activated again, the developer MUST store the auth result (which may contain the access code or an error) in the storage with the

SerializableWebAuthResult.Name

key. Then when the auth framework calls again the ReceiveCodeAsync(AuthorizationCodeRequestUrl,CancellationToken) it looks in the storage to find the auth result, and if a code was received the framework will convert it in turn to access and refresh tokens.

Member Function Documentation

async Task<AuthorizationCodeResponseUrl> Google.Apis.Auth.OAuth2.AuthorizationCodeBroker.ReceiveCodeAsync ( AuthorizationCodeRequestUrl  url,
CancellationToken  taskCancellationToken 
)
inline

Receives the authorization code.

Parameters
urlThe authorization code request URL
taskCancellationTokenCancellation token
Returns
The authorization code response

Implements Google.Apis.Auth.OAuth2.ICodeReceiver.

async Task<AuthorizationCodeResponseUrl> Google.Apis.Auth.OAuth2.AuthorizationCodeBroker.ReceiveCodeAsync ( AuthorizationCodeRequestUrl  url,
CancellationToken  taskCancellationToken 
)
inline

Receives the authorization code.

Parameters
urlThe authorization code request URL
taskCancellationTokenCancellation token
Returns
The authorization code response

Implements Google.Apis.Auth.OAuth2.ICodeReceiver.

async Task<AuthorizationCodeResponseUrl> Google.Apis.Auth.OAuth2.AuthorizationCodeBroker.ReceiveCodeAsync ( AuthorizationCodeRequestUrl  url,
CancellationToken  taskCancellationToken 
)
inline

Receives the authorization code.

Parameters
urlThe authorization code request URL
taskCancellationTokenCancellation token
Returns
The authorization code response

Implements Google.Apis.Auth.OAuth2.ICodeReceiver.


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