Show / Hide Table of Contents

Class OAuthTokenCredential

A credential used to access ArcGIS resources secured with OAuth.

Inheritance
System.Object
Credential
TokenCredential
OAuthTokenCredential
Implements
System.ComponentModel.INotifyPropertyChanged
System.Runtime.Serialization.ISerializable
TokenCredential.Token
TokenCredential.ExpirationDate
TokenCredential.UserName
TokenCredential.IsSsl
TokenCredential.GenerateTokenOptions
TokenCredential.RefreshTokenAsync()
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]
[Obsolete("Use OAuthUserCredential or OAuthApplicationCredential instead.")]
public sealed class OAuthTokenCredential : TokenCredential, INotifyPropertyChanged, ISerializable
Remarks

OAuthTokenCredential is deprecated in favor of ArcGISCredential. Depending on TokenAuthenticationType, you should use:

  • OAuthUserCredential for user authentication (OAuth 2.0 authorization code flow).
  • OAuthApplicationCredential for app authentication (OAuth 2.0 client credentials flow).
  • PregeneratedTokenCredential when your app handles token generation manually or externally.

You will generally get an instance of this class by calling GetCredentialAsync(CredentialRequestInfo, Boolean). To accommodate specific uses cases, this object can also be created manually.

Constructors

Name Description
OAuthTokenCredential(Uri, String, GenerateTokenOptions)

Initializes a new instance of the OAuthTokenCredential class.

Properties

Name Description
OAuthRefreshToken

Gets or sets the OAuth refresh token useful for getting a new access token once the old one expired.

RefreshTokenExchangeInterval

Gets or sets the exchange interval for the OAuth refresh token. The default is 24 hours.

RefreshTokenExpirationDate

Gets the date that the OAuthRefreshToken expires on, if known and applicable.

Methods

Name Description
ToJson()

Convert this Credential to a JSON string.

See Also

Esri.ArcGISRuntime.Security.ServerInfo.OAuthServerInfo
OAuthAuthorizeHandler

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 200.8
.NET Windows100.13 - 200.8
.NET Android200.0 - 200.8
.NET iOS200.0 - 200.8
.NET Framework100.0 - 200.8
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.8
In This Article
Back to top Copyright © 2022 Esri.