public class IdentityManagerBase
extends com.google.gwt.core.client.JavaScriptObject
Modifier and Type | Class and Description |
---|---|
static class |
IdentityManagerBase.RedirectionInfo |
Modifier and Type | Method and Description |
---|---|
Credential |
findCredential(java.lang.String url)
Returns the credential for the resource identified by the specified url.
|
Credential |
findCredential(java.lang.String url,
java.lang.String userId)
Returns the credential for the resource identified by the specified url.
|
ServerInfo |
findServerInfo(java.lang.String url)
Returns information about the server that is hosting the specified url.
|
Deferred |
generateToken(ServerInfo serverInfo,
com.google.gwt.core.client.JavaScriptObject userInfo)
Returns an object containing a token and its expiration time.
|
Deferred |
getCredential(java.lang.String url)
Returns a Credential object that can be used to access the secured resource identified by the input url.
|
Deferred |
getCredential(java.lang.String url,
boolean retry)
Returns a Credential object that can be used to access the secured resource identified by the input url.
|
int |
getTokenValidity()
The suggested lifetime of the token in minutes.
|
boolean |
isBusy()
Returns true if the identity manager is busy accepting user input, i.e.
|
void |
registerServers(ServerInfo serverInfos)
Register secure servers and the token endpoints.
|
void |
setRedirectionHandler(RedirectionHandler handler)
When accessing secure resources from ArcGIS.com or one of its sub-domains the IdentityManager redirects
the user to the ArcGIS.com sign-in page.
|
Deferred |
signIn(java.lang.String url,
ServerInfo serverInfo)
Sub-classes must implement this method to create and manager the user interface that is used to obtain a username and password
from the end-user.
|
public final int getTokenValidity()
public final Credential findCredential(java.lang.String url, java.lang.String userId)
url
- - The url to a server.userId
- - The userId for which you want to obtain credentials.public final Credential findCredential(java.lang.String url)
url
- - The url to a server.public final ServerInfo findServerInfo(java.lang.String url)
url
- - The url to a server.public final Deferred generateToken(ServerInfo serverInfo, com.google.gwt.core.client.JavaScriptObject userInfo)
serverInfo
- - A ServerInfo object that contains a token service URL.userInfo
- - A user info object containing a user name and password.public final Deferred getCredential(java.lang.String url, boolean retry)
url
- - The url for the secure resource.retry
- - Determines if the method should make additional attempts to get the credentials after a failure.public final Deferred getCredential(java.lang.String url)
url
- - The url for the secure resource.public final boolean isBusy()
public final void registerServers(ServerInfo serverInfos)
serverInfos
- - A ServerInfos object that defines the secure service and token endpoint. The
Identity Manager makes its best guess to determine the locatation of the secure server and token
endpoint so in most cases calling registerServers is not necessary. However if the location of
your server or token endpoint is non-standard use this method to register the location.public final void setRedirectionHandler(RedirectionHandler handler)
handler
- - handler to fire on redirectionpublic final Deferred signIn(java.lang.String url, ServerInfo serverInfo)
url
- - Url for the secure resource.serverInfo
- - A ServerInfo object that contains the token service url.