create

suspend fun create(url: String, username: String, password: String, tokenExpirationInterval: Int? = null): Result<TokenCredential>

Creates a TokenCredential to access secured ArcGIS resources, including portal, federated, and non-federated resources.

Return

A Result containing a TokenCredential.

Since

200.1.0

Parameters

url

The URL of the token-secured resource.

username

The case-sensitive username used to access the secured resource or retrieve a token.

password

The password used to access the secured resource or retrieve a token.

tokenExpirationInterval

The duration the token will remain valid, in minutes. If null or less than or equal to 0, the server default is used.