Show / Hide Table of Contents

Class OAuthApplicationCredential

A credential to access OAuth token-secured ArcGIS resources using the application's credentials.

Inheritance
System.Object
Credential
ArcGISCredential
OAuthApplicationCredential
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 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.

PortalUrl

Gets the URL of the portal to authenticate with.

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

Register Your Application

Applies to

TargetVersions
.NET Standard 2.0200.5 - 200.8
.NET200.5 - 200.8
.NET Windows200.5 - 200.8
.NET Android200.5 - 200.8
.NET iOS200.5 - 200.8
.NET Framework200.5 - 200.8
UWP200.5 - 200.8
In This Article
Back to top Copyright © 2022 Esri.