dojo.require("esri.Credential");
Description
(Added at v2.5)
The Credential class represents a credential object used to access a secure ArcGIS resource.
Samples
Search for
samples that use this class.
Properties
expires | Number | Token expiration time specified as number of milliseconds since 1 January 1970 00:00:00 UTC. |
isAdmin | Boolean | Indicates that this credential was created to access the ArcGIS REST Admin service. |
oAuthState | Object | The Identity Manager's setOAuthRedirectionHandler returns an object that contains a "state" parameter. |
server | String | The server url. |
ssl | Boolean | Indicates whether the resources accessed using this credential should be fetched over HTTPS protocol. |
token | String | Token generated by the token service using the specified userId and password. |
userId | String | User associated wth the Credential object. |
Methods
Events
[ On Style Events | Connect Style Event ]
All On Style event listeners receive a single event object. Additionally, the event object also contains a 'target' property whose value is the object which fired the event.
Events
destroy | | Fired when a credential object is destroyed. |
token-change | | Fired when the token associated with the credential is updated or changed. |
Old Events
onDestroy() | Fired when a credential object is destroyed. |
onTokenChange() | Fired when the token associated with the credential is updated or changed. |
Property Details
Token expiration time specified as number of milliseconds since 1 January 1970 00:00:00 UTC.
Indicates that this credential was created to access the ArcGIS REST Admin service. (Added at v3.0)
Known values: true | false
The Identity Manager's
setOAuthRedirectionHandler returns an object that contains a "state" parameter. This parameter info is what is returned for this property.
(Added at v3.10)
Indicates whether the resources accessed using this credential should be fetched over HTTPS protocol. (Added at v3.0)
Known values: true | false
Token generated by the token service using the specified userId and password.
User associated wth the Credential
object.
Method Details
Destroy a credential. When the credential is destroyed remove any map layers that are using this credential. (Added at v2.8)
Generate a new token and update the Credential's token property with the newly acquired token. Tokens are typically
kept valid using a timer that automatically triggers a refresh before the token expires. Use this method in cases where
the timer has been delayed or stopped.
Return the properties of this object in JSON. (Added at v2.8)
Event Details
[ On Style Events | Connect Style Event ]
Fired when a credential object is destroyed. After the credential is destroyed, remove any map layers that use this credential. (Added at v3.6)
Fired when the token associated with the credential is updated or changed. (Added at v3.6)
Fired when a credential object is destroyed. After the credential is destroyed, remove any map layers that use this credential. (Added at v2.8)
Fired when the token associated with the credential is updated or changed.