Show / Hide Table of Contents

Class OAuthUserConfiguration

The OAuth user configuration information used by an OAuthUserCredential.

Inheritance
object
OAuthUserConfiguration
Implements
IOAuthConfiguration
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Esri.ArcGISRuntime.Security
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class OAuthUserConfiguration : IOAuthConfiguration
Remarks

  • The portal URL, client ID, and redirect URL are required to create an OAuth user credential. See register your application and add a redirect URI for getting the client ID and redirect URL.
  • To configure the lifetime of an OAuthUserCredential, set the desired refresh token expiration and exchange intervals.
    • Default behavior: The refresh token expires after 14 days and is exchanged every 24 hours, allowing users to remain logged in unless the app is unused for the entire two-week period.
    • Require re-authentication: Set the exchange interval to a negative value to ensure users must log in again once the refresh token expires.
  • Creating an OAuthUserCredential displays an OAuth login page to the user. To customize the appearance of the login page, adjust parameters such as ShowCancelButton or UserInterfaceStyle.

Constructors

Name Description
OAuthUserConfiguration(Uri, string, Uri, CultureInfo?, TimeSpan, TimeSpan, TimeSpan, bool, UserInterfaceStyle, bool)

Initializes a new instance of the OAuthUserConfiguration class with the specified parameters.

Properties

Name Description
ClientId

Gets a unique identifier associated with an application registered with the portal that assists with client/server OAuth authentication.

Culture

Gets the OAuth login page is displayed in the language specified by the given culture code.

FederatedTokenExpirationInterval

Gets the requested expiration interval for federated tokens generated using the OAuth credential.

PortalUrl

Gets the URL of the portal to authenticate with.

PreferPrivateWebBrowserSession

Gets a value indicating whether the OAuth login session should ask the browser for a private authentication session.

RedirectUrl

Gets the URL that the OAuth login page will redirect to when authentication completes.

RefreshTokenExchangeInterval

Gets the interval at which the OAuth refresh token is exchanged (rotated) before expiration.

RefreshTokenExpirationInterval

Gets the requested expiration interval (in minutes) for the refreshToken generated by the OAuth request. Set this to MaxValue for getting the maximum refresh token supported by the portal (ninety days). The max interval can be overridden by the portal administrator.

ShowCancelButton

Gets a value indicating whether to show the "Cancel" button on the OAuth login page.

UserInterfaceStyle

Gets the constants indicating the interface style for the OAuth login page.

Methods

Name Description
CanBeUsedForUrl(Uri)

Checks if this configuration can be used for the given URL.

FromJson(string)

Convert a JSON string to an object.

ToJson()

Convert an object to JSON string.

Applies to

TargetVersions
.NET Standard 2.0200.5 - 200.8
.NET200.5 - 300.0
.NET Windows200.5 - 300.0
.NET Android200.5 - 300.0
.NET iOS200.5 - 300.0
.NET Framework200.5 - 200.8
UWP200.5 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.