Skip to content

NetworkAuthenticationChallenge Class

  • NetworkAuthenticationChallenge
  • class Esri::ArcGISRuntime::Authentication::NetworkAuthenticationChallenge

    A network authentication challenge. More...

    Header: #include <Authentication/NetworkAuthenticationChallenge.h>
    Since: Esri::ArcGISRuntime 200.8
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    virtual ~NetworkAuthenticationChallenge() override
    void cancel()
    void continueAndFail()
    void continueWithCredential(Esri::ArcGISRuntime::Authentication::NetworkCredential *credential)
    void continueWithError(const Esri::ArcGISRuntime::Error &error)
    QNetworkReply::NetworkError error() const
    QString errorString() const
    QString host() const
    std::optional<quint16> httpStatusCode() const
    Esri::ArcGISRuntime::Authentication::NetworkChallengeType networkChallengeType() const
    int previousFailureCount() const
    QList<QSslError> sslErrors() const

    Detailed Description

    A network authentication challenge is raised by the network authentication challenge handler of the authenticationManager if an ArcGIS secured resource requires network credentials, such as Integrated Windows Authentication (IWA) or Client Certificate (PKI).

    Member Function Documentation

    [override virtual noexcept] NetworkAuthenticationChallenge::~NetworkAuthenticationChallenge()

    Destructor.

    void NetworkAuthenticationChallenge::cancel()

    Cancels the request that initiated the challenge.

    void NetworkAuthenticationChallenge::continueAndFail()

    Handles the challenge without a credential, causing it to fail with the original authentication error.

    void NetworkAuthenticationChallenge::continueWithCredential(Esri::ArcGISRuntime::Authentication::NetworkCredential *credential)

    Handles the challenge with the specified credential.

    • credential - The credential to use when retrying the request.

    void NetworkAuthenticationChallenge::continueWithError(const Esri::ArcGISRuntime::Error &error)

    Handles the challenge with an error that occurred while trying to generate a credential. The request that issued an authentication challenge fails with the given error.

    • error - The error that was encountered during handling of the challenge.

    QNetworkReply::NetworkError NetworkAuthenticationChallenge::error() const

    Returns the error encountered internally with the QNetworkReply, directly from QNetworkReply::error().

    QString NetworkAuthenticationChallenge::errorString() const

    Returns the error string from the QNetworkReply, directly from QNetworkReply::errorString().

    QString NetworkAuthenticationChallenge::host() const

    Returns the host name of the request that led to this authentication challenge.

    std::optional<quint16> NetworkAuthenticationChallenge::httpStatusCode() const

    Returns the http status code, if there was one.

    For certain types of challenges, it is possible the connection was not even attempted because it was blocked. ServerTrust challenges for example will have no http status code since the connection was not made.

    Esri::ArcGISRuntime::Authentication::NetworkChallengeType NetworkAuthenticationChallenge::networkChallengeType() const

    Returns the type of the network challenge.

    int NetworkAuthenticationChallenge::previousFailureCount() const

    Returns the number of failures that previously occurred for this challenge.

    QList<QSslError> NetworkAuthenticationChallenge::sslErrors() const

    Returns a list of QSslError, if applicable.

    If there was an error establishing a secured connection, this method returns a list of QSslError.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.