Skip to content

PregeneratedTokenCredential Class

  • PregeneratedTokenCredential
  • class Esri::ArcGISRuntime::Authentication::PregeneratedTokenCredential

    A credential that accesses token-secured ArcGIS content and services using a token generated outside of your application. More...

    Header: #include <Authentication/PregeneratedTokenCredential.h>
    Since: Esri::ArcGISRuntime 200.8
    Inherits: Esri::ArcGISRuntime::Authentication::ArcGISCredential

    Public Functions

    PregeneratedTokenCredential(const QUrl &url, Esri::ArcGISRuntime::Authentication::TokenInfo *tokenInfo, const QString &referer, QObject *parent = nullptr)
    virtual ~PregeneratedTokenCredential() override
    Esri::ArcGISRuntime::Authentication::TokenInfo *tokenInfo() const

    Detailed Description

    Use this token if you are unable to use credentials, such as OAuthUserCredential or TokenCredential, and you have generated a token outside of the application.

    If you use this PregeneratedTokenCredential as part of the secure resource challenge handling, it will be stored in the ArcGISCredentialStore of the AuthenticationManager. It will be used by all subsequent requests that have a matching URL context.

    Member Function Documentation

    PregeneratedTokenCredential::PregeneratedTokenCredential(const QUrl &url, Esri::ArcGISRuntime::Authentication::TokenInfo *tokenInfo, const QString &referer, QObject *parent = nullptr)

    Creates an instance of a PregeneratedTokenCredential.

    • url - The URL of the token-secured resource.
    • tokenInfo - The TokenInfo used to access secured resources.
    • referer - The referer that was used to generate the TokenInfo.
    • parent - The optional parent QObject.

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

    Destructor.

    Esri::ArcGISRuntime::Authentication::TokenInfo *PregeneratedTokenCredential::tokenInfo() const

    Returns the TokenInfo used to create the credential.

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