createWithChallenge

suspend fun createWithChallenge(challenge: ArcGISAuthenticationChallenge, username: String, password: String, tokenExpirationInterval: Int? = null): Result<TokenCredential>

Creates a TokenCredential with information needed to access an ArcGIS resource.

Return

A Result containing a TokenCredential.

Since

200.1.0

Parameters

challenge

An ArcGISAuthenticationChallenge object from which to construct the TokenCredential.

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.