Show / Hide Table of Contents

Class AuthorizationCodeInstalledApp

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

Inheritance
object
AuthorizationCodeInstalledApp
Implements
IAuthorizationCodeInstalledApp
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public class AuthorizationCodeInstalledApp : IAuthorizationCodeInstalledApp
Remarks

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

Constructors

AuthorizationCodeInstalledApp(IAuthorizationCodeFlow, ICodeReceiver)

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

Declaration
public AuthorizationCodeInstalledApp(IAuthorizationCodeFlow flow, ICodeReceiver codeReceiver)
Parameters
Type Name Description
IAuthorizationCodeFlow flow
ICodeReceiver codeReceiver

Properties

CodeReceiver

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

Declaration
public ICodeReceiver CodeReceiver { get; }
Property Value
Type Description
ICodeReceiver

Flow

Gets the authorization code flow.

Declaration
public IAuthorizationCodeFlow Flow { get; }
Property Value
Type Description
IAuthorizationCodeFlow

Methods

AuthorizeAsync(string, CancellationToken)

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

Declaration
public Task<UserCredential> AuthorizeAsync(string userId, CancellationToken taskCancellationToken)
Parameters
Type Name Description
string userId

User identifier

CancellationToken taskCancellationToken

Cancellation token to cancel an operation

Returns
Type Description
Task<UserCredential>

The user's credential

ShouldRequestAuthorizationCode(TokenResponse)

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

Declaration
public bool ShouldRequestAuthorizationCode(TokenResponse token)
Parameters
Type Name Description
TokenResponse token
Returns
Type Description
bool

Implements

IAuthorizationCodeInstalledApp
In this article
Back to top Generated by DocFX