Show / Hide Table of Contents

Method CreateAsync

CreateAsync(Uri, String, String, TimeSpan, CancellationToken)

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

Declaration
public static Task<AccessTokenCredential> CreateAsync(Uri url, string username, string password, TimeSpan tokenExpirationInterval = default(TimeSpan), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Uri url

The URL of the token-secured resource.

System.String username

The case-sensitive username used to access the secured resource or retrieve a token.

System.String password

The password 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

The expiration resolution is whole minutes and seconds will be ignored.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.6 - 200.8
.NET200.6 - 200.8
.NET Windows200.6 - 200.8
.NET Android200.6 - 200.8
.NET iOS200.6 - 200.8
.NET Framework200.6 - 200.8
UWP200.6 - 200.8
In This Article
Back to top Copyright © 2022 Esri.