C# Class Google.Apis.Auth.OAuth2.Mvc.AuthorizationCodeMvcApp

Thread-safe OAuth 2.0 authorization code flow for a MVC web application that persists end-user credentials.
Inheritance: Google.Apis.Auth.OAuth2.Web.AuthorizationCodeWebApp
Show file Open project: Gainedge/BetterExplorer Class Usage Examples

Public Methods

Method Description
AuthorizationCodeMvcApp ( Controller controller, FlowMetadata flowData ) : System

Constructs a new authorization code MVC app using the given controller and flow data.

AuthorizeAsync ( CancellationToken taskCancellationToken ) : Task

Asynchronously authorizes the installed application to access user's protected data. It gets the user identifier by calling to Google.Apis.Auth.OAuth2.Mvc.FlowMetadata.GetUserId and then calls to Google.Apis.Auth.OAuth2.AuthorizationCodeWebApp.AuthorizeAsync.

Method Details

AuthorizationCodeMvcApp() public method

Constructs a new authorization code MVC app using the given controller and flow data.
public AuthorizationCodeMvcApp ( Controller controller, FlowMetadata flowData ) : System
controller Controller
flowData FlowMetadata
return System

AuthorizeAsync() public method

Asynchronously authorizes the installed application to access user's protected data. It gets the user identifier by calling to Google.Apis.Auth.OAuth2.Mvc.FlowMetadata.GetUserId and then calls to Google.Apis.Auth.OAuth2.AuthorizationCodeWebApp.AuthorizeAsync.
public AuthorizeAsync ( CancellationToken taskCancellationToken ) : Task
taskCancellationToken System.Threading.CancellationToken Cancellation token to cancel an operation
return Task