C# Класс Xamarin.Auth.OAuth2Authenticator.OAuth2Authenticator

Наследование: WebRedirectAuthenticator
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
OAuth2Authenticator System
RequestAccessTokenAsync string>>.Task

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

Метод Описание
GetInitialUrlAsync ( ) : Task

Method that returns the initial URL to be displayed in the web browser.

OAuth2Authenticator ( string clientId, string scope, Uri authorizeUrl, Uri redirectUrl, GetUsernameAsyncFunc getUsernameAsync = null ) : System

Initializes a new Xamarin.Auth.OAuth2Authenticator that authenticates using implicit granting (token).

OAuth2Authenticator ( string clientId, string clientSecret, string scope, Uri authorizeUrl, Uri redirectUrl, Uri accessTokenUrl, GetUsernameAsyncFunc getUsernameAsync = null ) : System

Initializes a new instance Xamarin.Auth.OAuth2Authenticator that authenticates using authorization codes (code).

Защищенные методы

Метод Описание
OnPageEncountered ( Uri url, string>.IDictionary query, string>.IDictionary fragment ) : void

Raised when a new page has been loaded.

OnRedirectPageLoaded ( Uri url, string>.IDictionary query, string>.IDictionary fragment ) : void

Raised when a new page has been loaded.

OnRetrievedAccountProperties ( string>.IDictionary accountProperties ) : void

Event handler that is fired when an access token has been retreived.

RequestAccessTokenAsync ( string>.IDictionary queryValues ) : string>>.Task

Asynchronously makes a request to the access token URL with the given parameters.

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

Метод Описание
OAuth2Authenticator ( Uri redirectUrl, string clientSecret = null, Uri accessTokenUrl = null ) : System
RequestAccessTokenAsync ( string code ) : string>>.Task

Asynchronously requests an access token with an authorization code.

Implements: http://tools.ietf.org/html/rfc6749#section-4.1

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

GetInitialUrlAsync() публичный Метод

Method that returns the initial URL to be displayed in the web browser.
public GetInitialUrlAsync ( ) : Task
Результат Task

OAuth2Authenticator() публичный Метод

Initializes a new Xamarin.Auth.OAuth2Authenticator that authenticates using implicit granting (token).
public OAuth2Authenticator ( string clientId, string scope, Uri authorizeUrl, Uri redirectUrl, GetUsernameAsyncFunc getUsernameAsync = null ) : System
clientId string /// Client identifier. ///
scope string /// Authorization scope. ///
authorizeUrl System.Uri /// Authorize URL. ///
redirectUrl System.Uri /// Redirect URL. ///
getUsernameAsync GetUsernameAsyncFunc /// Method used to fetch the username of an account /// after it has been successfully authenticated. ///
Результат System

OAuth2Authenticator() публичный Метод

Initializes a new instance Xamarin.Auth.OAuth2Authenticator that authenticates using authorization codes (code).
public OAuth2Authenticator ( string clientId, string clientSecret, string scope, Uri authorizeUrl, Uri redirectUrl, Uri accessTokenUrl, GetUsernameAsyncFunc getUsernameAsync = null ) : System
clientId string /// Client identifier. ///
clientSecret string /// Client secret. ///
scope string /// Authorization scope. ///
authorizeUrl System.Uri /// Authorize URL. ///
redirectUrl System.Uri /// Redirect URL. ///
accessTokenUrl System.Uri /// URL used to request access tokens after an authorization code was received. ///
getUsernameAsync GetUsernameAsyncFunc /// Method used to fetch the username of an account /// after it has been successfully authenticated. ///
Результат System

OnPageEncountered() защищенный Метод

Raised when a new page has been loaded.
protected OnPageEncountered ( Uri url, string>.IDictionary query, string>.IDictionary fragment ) : void
url System.Uri /// URL of the page. ///
query string>.IDictionary /// The parsed query of the URL. ///
fragment string>.IDictionary /// The parsed fragment of the URL. ///
Результат void

OnRedirectPageLoaded() защищенный Метод

Raised when a new page has been loaded.
protected OnRedirectPageLoaded ( Uri url, string>.IDictionary query, string>.IDictionary fragment ) : void
url System.Uri /// URL of the page. ///
query string>.IDictionary /// The parsed query string of the URL. ///
fragment string>.IDictionary /// The parsed fragment of the URL. ///
Результат void

OnRetrievedAccountProperties() защищенный Метод

Event handler that is fired when an access token has been retreived.
protected OnRetrievedAccountProperties ( string>.IDictionary accountProperties ) : void
accountProperties string>.IDictionary /// The retrieved account properties ///
Результат void

RequestAccessTokenAsync() защищенный Метод

Asynchronously makes a request to the access token URL with the given parameters.
protected RequestAccessTokenAsync ( string>.IDictionary queryValues ) : string>>.Task
queryValues string>.IDictionary The parameters to make the request with.
Результат string>>.Task