C# Класс Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker

A helper utility to manage the authorization code flow.
Показать файл Открыть проект

Открытые методы

Метод Описание
AuthorizeAsync ( Google.Apis.Auth.OAuth2.ClientSecrets clientSecrets, IEnumerable scopes, string user, CancellationToken taskCancellationToken ) : Task

Asynchronously authorizes the specified user.

It uses Google.Apis.Util.Store.StorageDataStore as the flow's data store by default.

AuthorizeAsync ( Stream clientSecretsStream, IEnumerable scopes, string user, CancellationToken taskCancellationToken ) : Task

Asynchronously authorizes the specified user.

It uses Google.Apis.Util.Store.StorageDataStore as the flow's data store by default.

AuthorizeAsync ( Uri clientSecretsUri, IEnumerable scopes, string user, CancellationToken taskCancellationToken ) : Task

Asynchronously authorizes the specified user.

It uses Google.Apis.Util.Store.StroageDataStore as the flow's data store by default.

Приватные методы

Метод Описание
AuthorizeAsyncCore ( Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow initializer, IEnumerable scopes, string user, CancellationToken taskCancellationToken ) : Task

The core logic for asynchronously authorizing the specified user.

LoadClientSecrets ( Uri clientSecretsUri ) : Task

Loads the client secrets from the given URI.

Описание методов

AuthorizeAsync() публичный статический Метод

Asynchronously authorizes the specified user.
It uses Google.Apis.Util.Store.StorageDataStore as the flow's data store by default.
public static AuthorizeAsync ( Google.Apis.Auth.OAuth2.ClientSecrets clientSecrets, IEnumerable scopes, string user, CancellationToken taskCancellationToken ) : Task
clientSecrets Google.Apis.Auth.OAuth2.ClientSecrets The client secrets.
scopes IEnumerable /// The scopes which indicate the Google API access your application is requesting. ///
user string The user to authorize.
taskCancellationToken System.Threading.CancellationToken Cancellation token to cancel an operation.
Результат Task

AuthorizeAsync() публичный статический Метод

Asynchronously authorizes the specified user.
It uses Google.Apis.Util.Store.StorageDataStore as the flow's data store by default.
public static AuthorizeAsync ( Stream clientSecretsStream, IEnumerable scopes, string user, CancellationToken taskCancellationToken ) : Task
clientSecretsStream Stream /// The client secrets stream. The AuthorizationCodeFlow constructor is responsible for disposing the stream. /// Note that it's more secured to use the authenticate method which gets , and /// hard code your secrets in your app rather than storing the secrets in a separate unsecured file. ///
scopes IEnumerable /// The scopes which indicate the Google API access your application is requesting. ///
user string The user to authorize.
taskCancellationToken System.Threading.CancellationToken Cancellation token to cancel an operation.
Результат Task

AuthorizeAsync() публичный статический Метод

Asynchronously authorizes the specified user.
It uses Google.Apis.Util.Store.StroageDataStore as the flow's data store by default.
public static AuthorizeAsync ( Uri clientSecretsUri, IEnumerable scopes, string user, CancellationToken taskCancellationToken ) : Task
clientSecretsUri System.Uri The client secrets URI.
scopes IEnumerable /// The scopes which indicate the Google API access your application is requesting. ///
user string The user to authorize.
taskCancellationToken System.Threading.CancellationToken Cancellation token to cancel an operation.
Результат Task