Method CreateNetworkSecuredAsync
CreateNetworkSecuredAsync(Uri, string, TimeSpan, CancellationToken)
Creates an AccessTokenCredential with information needed to access an ArcGIS resource.
Declaration
public static Task<AccessTokenCredential> CreateNetworkSecuredAsync(Uri url, string username = "", TimeSpan tokenExpirationInterval = default, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | url | The URL of the network secured resource. |
| string | username | An optional username to associate with the credential. This value is informational only and can be an empty string. |
| TimeSpan | tokenExpirationInterval | The duration the token will remain valid. The value must be greater than Zero, otherwise the server default is used. |
| CancellationToken | cancellationToken | Cancellation token |
Returns
| Type | Description |
|---|---|
| Task<AccessTokenCredential> | Returns an 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 - 200.8 |
| .NET | 200.6 - 300.0 |
| .NET Windows | 200.6 - 300.0 |
| .NET Android | 200.6 - 300.0 |
| .NET iOS | 200.6 - 300.0 |
| .NET Framework | 200.6 - 200.8 |
| UWP | 200.6 - 200.8 |