Class OAuthUserCredential
A credential that access OAuth token-secured ArcGIS resources using an OAuthUserConfiguration.
Implements
Namespace: Esri.ArcGISRuntime.Security
Assembly: Esri.ArcGISRuntime.dll
Syntax
[Serializable]
public sealed class OAuthUserCredential : ArcGISCredential, INotifyPropertyChanged, ISerializable
Remarks
The OAuth user credential generates a short-lived access token that gives the user permission to access token-secured ArcGIS content and services, such as the ArcGIS location services.
The OAuth login process presents the user with an OAuth login page. You can configure the look and feel of this login page by setting OAuthUserConfiguration properties, such as ShowCancelButton or UserInterfaceStyle.
If you return an OAuthUserCredential from a challenge handler, it will be stored in the Persistence of the AuthenticationManager. It will be used by all subsequent requests that have a matching URL.
Properties
Name | Description |
---|---|
AuthorizationCode | Gets an authorization code to generate the OAuth token. |
Configuration | Gets the OAuth configuration details of an application that can sign into an ArcGIS Online or ArcGIS Enterprise portal using OAuth. |
Referer | Gets the referer (unused on OAuth credentials). |
Methods
Name | Description |
---|---|
CreateAsync(OAuthUserConfiguration, CancellationToken) | Creates an OAuthUserCredential with information needed to access an ArcGIS resource. This initiates the OAuth login process by invoking the OAuthAuthorizeHandler. |
GetTokenInfoAsync(CancellationToken) | Returns an instance of OAuthUserTokenInfo generated by this credential. |
RevokeTokenAsync(CancellationToken) | Sends a network request to revoke OAuth refresh and access tokens. |
ToJson() | Convert this Credential to a JSON string. |
See Also
Applies to
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 |