Package | com.esri.bacore.client |
Class | public class TokenProvider |
Inheritance | TokenProvider Object |
Implements | ITokenProvider, flash.utils.IExternalizable |
Subclasses | ArcGISTokenProvider, BAOnlineTokenProvider, BAServerTokenProvider |
Subclasses of this class must implement the "abstract" authenticationTask
property and the execute
method. The populateUserInfo
hook is applied
just before requesting user credentials in order to prepare a userInfo object to be passed
to IAuthentication
instance.
See also
Property | Defined By | ||
---|---|---|---|
authenticationTask : AbstractTask [read-only]
Authentication task associated with this token provider. | TokenProvider | ||
currentToken : String
Current authentication token. | TokenProvider | ||
proxyURL : String
The URL to proxy the request through. | TokenProvider | ||
url : String
Authentication service URL. | TokenProvider |
Method | Defined By | ||
---|---|---|---|
TokenProvider(authentication:IAuthentication = null)
Creates a new instance of the TokenProvider type. | TokenProvider | ||
updateToken(responder:IResponder):void
Requests an authentication service for getting a new security token. | TokenProvider |
Method | Defined By | ||
---|---|---|---|
execute(userCredentials:Object, responder:IResponder):void
Executes the authentication task. | TokenProvider | ||
populateUserInfo(userInfo:Object):void
Populates the userInfo object with properties to be passed
to the IAuthentication object. | TokenProvider |
authenticationTask | property |
authenticationTask:AbstractTask
[read-only] Authentication task associated with this token provider. This property is "abstract". Its default implementation throws an error.
public function get authenticationTask():AbstractTask
currentToken | property |
currentToken:String
Current authentication token.
This property is the proxy to the authentication task token property. In an authentication task, the "token" property is not passed to an authentication service. Instead of this, the "token" property is used as a storage for the current token. When the authentication task successfully executes the authentication method, it must update its "token" property with the new value of token.
public function get currentToken():String
public function set currentToken(value:String):void
proxyURL | property |
proxyURL:String
Since : | Community Analyst API for Flex 2.2. |
The URL to proxy the request through.
public function get proxyURL():String
public function set proxyURL(value:String):void
url | property |
url:String
Authentication service URL.
public function get url():String
public function set url(value:String):void
TokenProvider | () | Constructor |
public function TokenProvider(authentication:IAuthentication = null)
Creates a new instance of the TokenProvider type.
Parametersauthentication:IAuthentication (default = null ) — An object used for getting user credentials.
|
execute | () | method |
protected function execute(userCredentials:Object, responder:IResponder):void
Executes the authentication task. This method is "abstract". Its default implementation throws an error.
Parameters
userCredentials:Object — An object containing user credentials passed to the authentication task.
| |
responder:IResponder — A responder.
|
populateUserInfo | () | method |
protected function populateUserInfo(userInfo:Object):void
Populates the userInfo object with properties to be passed to the IAuthentication object. The default implementation does nothing. On input, the userInfo object contains the "url" property value with the authentication task URL.
Parameters
userInfo:Object — User info object.
|
updateToken | () | method |
public function updateToken(responder:IResponder):void
Requests an authentication service for getting a new security token.
If the token service fails to get a new token, the responder.fault
method is called with an instance of the mx.rpc.events.FaultEvent
type.
If the token service returns a new security token, the currentToken
property is updated with the new token value and after that the
responder.result
method is called with with the new token passed in
the first parameter.
Parameters
responder:IResponder — Responder object to be notified on a response from the token service.
|