C# Class 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.
Inheritance: IOAuthAuthorize
Afficher le fichier Open project: Esri/arcgis-toolkit-sl-wpf Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

AuthorizeAsync() public méthode

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.
Résultat string>>.Task

Initialize() public static méthode

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.
Résultat void

OAuthAuthorize() public méthode

Initializes a new instance of the OAuthAuthorize class.
public OAuthAuthorize ( ) : System.Json
Résultat System.Json