Skip To Content ArcGIS for Developers Sign In Dashboard

AuthenticationChallenge QML Type

An authentication challenge used when accessing secured resources. More...

Import Statement: import Esri.ArcGISRuntime 100.6
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Properties

Methods

Detailed Description

Instances of this type represent an authentication challenge that was raised because a security error was encountered while trying to access a secured network resource. You can connect to the QmlAuthenticationManager::authenticationChallenge signal in order to handle challenges raised from security errors.

To satisfy the challenge, you need to do one of the following:

Property Documentation

authenticatingHost : url

Returns the host server of the network resource being accessed (read-only).

This is useful to display to a user when prompting them for a credential when a resource fails to load.


authenticationChallengeType : Enums.AuthenticationChallengeType

Returns the Enums.AuthenticationChallengeType of this authentication challenge (read-only).

This is useful for displaying a user interface to the user for a credential when a resource fails to load.


authorizationUrl : url

Returns the OAuth authorization URL to access to obtain an authorization code (read-only).

This property is only populated when the challenge type is Enums.AuthenticationChallengeTypeOAuth for OAuth user authentication.


error : Error

Returns the underlying security error that led to this authentication challenge (read-only).


failureCount : int

Returns the number of times this particular challenge has failed (read-only).


proposedCredential : Credential

Returns the credential that is currently being used to access a secured resource (read-only).

This could be a pre-configured credential with limited properties already defined for you. This credential can be used to specify the identity through a username/password, or token, and then call continueWithCredential.


requestUrl : url

Returns the URL being accessed that led to this authentication challenge (read-only).


sslErrors : list<string>

Returns a list of SSL error strings when a Enums.AuthenticationChallengeTypeSslHandshake error has occurred (read-only).

This property is only populated when the challenge type is Enums.AuthenticationChallengeTypeSslHandshake indicating that an SSL error occurred when attempting to access a secured resource.

Inspect these errors or prompt the end user to determine if the request should continue and ignore these errors.


Method Documentation

void cancel()

Cancels the operation that led to the authentication challenge.

The resource will fail to load and should emit an error signal.


void continueWithClientCertificate(int clientCertificateIndex)

Attempts to continue with the network transaction with the provided clientCertificateIndex.

This will obtain a client certificate from AuthenticationManager::clientCertificateInfos which is then applied to the proposed credential to continue with the request.


void continueWithCredential(Credential credential)

Attempts to continue with the network transaction with the provided credential.

Continuing with a null credential will cause the resource to fail to load.


void continueWithOAuthAuthorizationCode(string oAuthAuthorizationCode)

Attempts to continue with the network transaction with the provided oAuthAuthorizationCode.

This will populate the proposed credential with the OAuth authorization code to continue with the request.


void continueWithSslHandshake(bool trust, bool remember)

Attempts to continue with the network transaction specifying whether to trust the host and remember for future requests.

If requested to remember to trust, or not trust, a specific host, a challenge will not be issued for this host again for the application session.


void continueWithUsernamePassword(string username, string password)

Attempts to continue with the network transaction with the provided username and password.

This will populate the proposed credential with username and password to continue with the request.



Feedback on this topic?