createNetworkSecured static method
Creates a TokenCredential
with information needed to access an ArcGIS
resource.
If the required network credential is not available in the network credential store, a network authentication challenge is expected to be issued.
Parameters:
uri
— The URL of the network secured resource.username
— The username 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> createNetworkSecured(
{required Uri uri,
required String username,
int tokenExpirationInterval = 0}) async {
await _packageInfoCompleter.future;
return _createNetworkSecured(
uri: uri,
username: username,
tokenExpirationInterval: tokenExpirationInterval);
}