Method CreateNetworkSecuredAsync
CreateNetworkSecuredAsync(Uri, String, TimeSpan, CancellationToken)
Creates a AccessTokenCredential with information needed to access an ArcGIS resource.
Declaration
public static Task<AccessTokenCredential> CreateNetworkSecuredAsync(Uri url, string username, TimeSpan tokenExpirationInterval = default(TimeSpan), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Uri | url | The URL of the network secured resource. |
System.String | username | The username used to access the secured resource or retrieve a token. |
System.TimeSpan | tokenExpirationInterval | The duration the token will remain valid. The value must be greater than System.TimeSpan.Zero, otherwise the server default is used. Effective expiration will be rounded down to the nearest minute. |
System.Threading.CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<AccessTokenCredential> | Returns a AccessTokenCredential. |
Remarks
If the required network credential is not available in the network credential store, a network authentication challenge is expected to be issued. The expiration resolution is whole minutes and seconds will be ignored.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 200.6 |
.NET | 200.6 |
.NET Windows | 200.6 |
.NET Android | 200.6 |
.NET iOS | 200.6 |
.NET Framework | 200.6 |
UWP | 200.6 |