Show / Hide Table of Contents

Class OAuthUserCredential

A credential that access OAuth token-secured ArcGIS resources using an OAuthUserConfiguration.

Inheritance
System.Object
Credential
ArcGISCredential
OAuthUserCredential
Implements
System.ComponentModel.INotifyPropertyChanged
System.Runtime.Serialization.ISerializable
ArcGISCredential.Username
Credential.ServiceUri
Credential.ServerContext
Credential.PropertyChanged
Credential.ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Credential.FromJson(String)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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

Register Your Application

Applies to

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.