TokenCredential class final
A credential that accesses token-secured ArcGIS content and services.
To create a token credential, provide a secured service URL, valid username, and password. Alternatively, you can create a token credential for network secure resources that are secured using network authentication, such as Integrated Windows Authentication (IWA) or Public Key Infrastructure (PKI). In both bases, you can specify a token expiration in minutes.
If you use this TokenCredential as part of the secure resource challenge handling, it will be stored in the ArcGISCredentialStore of the AuthenticationManager. It will be used by all subsequent requests that have a matching URL context.
- Inheritance
-
- Object
- ArcGISCredential
- TokenCredential
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- referer → String
-
The referer used to generate a token.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverContext → Uri
-
The URL by which the root of a server is accessed.
no setterinherited
- tokenExpirationInterval → int
-
The length of time a token credential remains valid. Represented in
minutes. If not explicitly set, the server default is used.
no setter
- username → String
-
The user associated with the credential.
no setterinherited
Methods
-
getTokenInfo(
) → Future< TokenInfo> - Returns an instance of TokenInfo generated by this credential.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a JSON representation of this Object in the data type used by jsonDecode.
inherited
-
toJsonString(
) → String -
Returns a JSON representation of this Object as a String.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
{required Uri uri, required String username, required String password, int tokenExpirationInterval = 0}) → Future< TokenCredential> - Creates a TokenCredential to access a secured ArcGIS resource.
-
createNetworkSecured(
{required Uri uri, required String username, int tokenExpirationInterval = 0}) → Future< TokenCredential> - Creates a TokenCredential for a network secured ArcGIS resource.
-
createWithChallenge(
ArcGISAuthenticationChallenge challenge, {required String username, required String password, int tokenExpirationInterval = 0}) → Future< TokenCredential> - Creates a TokenCredential with information needed to access an ArcGIS resource.