create static method
Creates a TokenCredential to access a secured ArcGIS resource.
Parameters:
uri
— The URL of the token-secured resource.username
— The 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, represented in minutes. The value must be greater than 0, otherwise the server default is used.
Return Value: Returns a TokenCredential.
Implementation
static Future<TokenCredential> create({
required Uri uri,
required String username,
required String password,
int tokenExpirationInterval = 0,
}) async {
await _packageInfoCompleter.future;
return _create(
uri: uri,
username: username,
password: password,
tokenExpirationInterval: tokenExpirationInterval,
);
}