Method CreateAsync
CreateAsync(Uri, String, String, TimeSpan, CancellationToken)
Creates an OAuthApplicationCredential with information needed to access an ArcGIS resource.
Declaration
public static Task<OAuthApplicationCredential> CreateAsync(Uri portalUrl, string clientId, string clientSecret, TimeSpan tokenExpirationInterval = default(TimeSpan), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Uri | portalUrl | The URL of the portal to authenticate with. |
System.String | clientId | A unique identifier associated with an application registered with the portal that assists with client/server OAuth authentication. |
System.String | clientSecret | A private key that verifies the application is authorized to access the registered service. |
System.TimeSpan | tokenExpirationInterval | The duration the token will remain valid, represented in minutes. The value must be at least 1 minute, otherwise the server default is used. |
System.Threading.CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<OAuthApplicationCredential> | Returns an OAuthApplicationCredential. |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 200.5 - 200.6 |
.NET | 200.5 - 200.6 |
.NET Windows | 200.5 - 200.6 |
.NET Android | 200.5 - 200.6 |
.NET iOS | 200.5 - 200.6 |
.NET Framework | 200.5 - 200.6 |
UWP | 200.5 - 200.6 |