C# Класс ESRI.ArcGIS.Client.Toolkit.OAuthAuthorize

Manages the Silverlight OAuth authorization process. Instantiate an instance of this class to initialize the IdentityManager.ServerInfo.OAuthClientInfo OAuthAuthorize property.
Наследование: IOAuthAuthorize
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AuthorizeAsync ( string url, string authorizeUrl, string callbackUrl ) : string>>.Task

Redirects the user to the authorization URL.

Initialize ( string portalUrl ) : void

Initializes the Silverlight application for getting authorization from an OAuth authorization page. Calling this method is optional but offers the following advantages: Initializes a default IdentityManager challenge method that manages the single sign in to the portal. Restores the portal OAuth credential that may have been persisted during a previous session (using the 'Keep Me Signed In' option). Injects in the main HTML page the OAuth scripts that manage the answers of the OAuth authorization server.

OAuthAuthorize ( ) : System.Json

Initializes a new instance of the OAuthAuthorize class.

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

Метод Описание
DecodeParameters ( Uri uri ) : string>.IDictionary

Decodes the parameters returned when the user agent is redirected to the callback url The parameters can be returned as fragments (e.g. access_token for Browser based app) or as query parameter (e.g. code for Server based app)

FromDictionary ( string>.IDictionary dictionary ) : IdentityManager.Credential
FromJsonValue ( JsonValue jsonValue ) : IdentityManager.Credential
IsCookieEnabled ( ) : bool
LoadOAuthToken ( string portalUrl ) : IdentityManager.Credential
LoadOAuthTokenFromCookie ( ) : IdentityManager.Credential
OpenAuthorizeWindow ( ) : void
RemoveOAuthTokenFromCookie ( ) : void
RemovePersistedOAuthToken ( string portalUrl ) : void
SaveOAuthToken ( string portalUrl, string>.IDictionary parameters ) : void
SaveOAuthTokenAsCookie ( string>.IDictionary parameters ) : void
SetResult ( string callbackUrl ) : void

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

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

Redirects the user to the authorization URL.
public AuthorizeAsync ( string url, string authorizeUrl, string callbackUrl ) : string>>.Task
url string The service URL.
authorizeUrl string The authorize URL.
callbackUrl string The callback URL.
Результат string>>.Task

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

Initializes the Silverlight application for getting authorization from an OAuth authorization page. Calling this method is optional but offers the following advantages: Initializes a default IdentityManager challenge method that manages the single sign in to the portal. Restores the portal OAuth credential that may have been persisted during a previous session (using the 'Keep Me Signed In' option). Injects in the main HTML page the OAuth scripts that manage the answers of the OAuth authorization server.
public static Initialize ( string portalUrl ) : void
portalUrl string The portal URL.
Результат void

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

Initializes a new instance of the OAuthAuthorize class.
public OAuthAuthorize ( ) : System.Json
Результат System.Json