Class OAuthApplicationCredential
A credential to access OAuth token-secured ArcGIS resources using the application's credentials.
Implements
Namespace: Esri.ArcGISRuntime.Security
Assembly: Esri.ArcGISRuntime.dll
Syntax
[Serializable]
public sealed class OAuthApplicationCredential : ArcGISCredential, INotifyPropertyChanged, ISerializable
Remarks
The OAuth application credential generates a short-lived access token that gives your application permission to access token-secured ArcGIS content and services, such as the ArcGIS location services.
The OAuthApplicationCredential requires a private 'client secret'. It is important to treat this as you would your password. You must keep it confidential and we recommended not storing in your application.
If you use this OAuthApplicationCredential as part of the secure resource challenge handling, it will be stored with the AuthenticationManager. It can then be used by all subsequent requests that have a matching URL context.
Properties
Name | Description |
---|---|
ClientId | Gets a unique identifier associated with an application registered with the portal that assists with client/server OAuth authentication. |
Referer | Gets the referer used to generate a token. |
TokenExpirationInterval | Gets the length of time a token credential remains valid. If set to System.TimeSpan.Zero, the server default is used. |
Methods
Name | Description |
---|---|
CreateAsync(Uri, String, String, TimeSpan, CancellationToken) | Creates an OAuthApplicationCredential with information needed to access an ArcGIS resource. |
GetTokenInfoAsync(CancellationToken) | Returns an instance of OAuthApplicationTokenInfo generated by this credential. |
ToJson() | Convert this Credential to a JSON string. |
See Also
Applies to
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 |