Skip to content

ArcGISCredential Class

  • ArcGISCredential
  • class Esri::ArcGISRuntime::Authentication::ArcGISCredential

    A base class for types of ArcGIS credentials used to access secured resources. More...

    Public Functions

    virtual ~ArcGISCredential() override
    Esri::ArcGISRuntime::Authentication::ArcGISCredentialType arcGISCredentialType() const
    QString referer() const
    QUrl serverContext() const
    QString username() const
    bool operator!=(Esri::ArcGISRuntime::Authentication::ArcGISCredential *other) const
    bool operator==(Esri::ArcGISRuntime::Authentication::ArcGISCredential *other) const

    Reimplemented Public Functions

    virtual QString toJson() const override
    (deprecated) virtual QJsonObject unknownJson() const override
    (deprecated) virtual QJsonObject unsupportedJson() const override

    Static Public Members

    Esri::ArcGISRuntime::Authentication::ArcGISCredential *fromJson(const QString &json, QObject *parent = nullptr)

    Detailed Description

    This is a base class for ArcGIS credentials requiring OAuth or ArcGIS Token authentication, such as OAuthUserCredential, OAuthApplicationCredential, PregeneratedTokenCredential and TokenCredential.

    Member Function Documentation

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

    Destructor.

    Esri::ArcGISRuntime::Authentication::ArcGISCredentialType ArcGISCredential::arcGISCredentialType() const

    Returns the type of the credential.

    [static] Esri::ArcGISRuntime::Authentication::ArcGISCredential *ArcGISCredential::fromJson(const QString &json, QObject *parent = nullptr)

    Convert a JSON string to an object.

    • json - The JSON string.
    • parent - The optional parent QObject.

    QString ArcGISCredential::referer() const

    Returns the referer used to generate a token.

    QUrl ArcGISCredential::serverContext() const

    Returns the URL by which the root of a server is accessed.

    This is the URL against which rest endpoints are resolved. For example, "https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0" would have a server context of "https://sampleserver3.arcgisonline.com/ArcGIS", on which we could add "/rest/info" or "/rest" to fetch the server information.

    [override virtual] QString ArcGISCredential::toJson() const

    Reimplements: JsonSerializable::toJson() const.

    Converts and returns an object to JSON string.

    QString ArcGISCredential::username() const

    Returns the user associated with the credential.

    bool ArcGISCredential::operator!=(Esri::ArcGISRuntime::Authentication::ArcGISCredential *other) const

    Tests and returns true if the two ArcGISCredential objects are not equal.

    • other - The second object to compare to.

    bool ArcGISCredential::operator==(Esri::ArcGISRuntime::Authentication::ArcGISCredential *other) const

    Tests and returns true if the two ArcGISCredential objects are equal.

    • other - The credential to compare to.

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