A credential for accessing OAuth token secured ArcGIS resources. More...
Header | #include <Authentication/ |
Since | Esri |
Inherits | Esri |
Public Functions
virtual | ~ |
Q | authorization |
Esri | configuration() const |
Q | revoke |
Q | token |
Static Public Members
Q | create |
Detailed Description
Member Function Documentation
[override virtual noexcept]
OAuthUserCredential::~OAuthUserCredential ()
Destructor.
QString OAuthUserCredential::authorizationCode () const
Returns an authorization code to generate the OAuth token.
Esri::ArcGISRuntime::Authentication::OAuthUserConfiguration *OAuthUserCredential::configuration() const
Returns the OAuth configuration details of an application that can sign into an ArcGIS Online or ArcGIS Enterprise portal using OAuth.
See also Register Your Application.
[static]
QFuture <Esri::ArcGISRuntime::Authentication::OAuthUserCredential *> OAuthUserCredential::createAsync (Esri::ArcGISRuntime::Authentication::OAuthUserConfiguration *configuration, QObject *parent = nullptr)
Creates an OAuthUserCredential with information needed to access an ArcGIS resource. This initiates the OAuth login process by presenting the OAuth login page.
- configuration - The OAuth configuration details of an application that can sign into an ArcGIS Online or ArcGIS Enterprise portal using OAuth.
- parent - An optional parent.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
QFuture <void> OAuthUserCredential::revokeTokenAsync ()
Sends a network request to revoke OAuth refresh and access tokens.
This call will fail if the tokens have not been successfully revoked.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.
QFuture <Esri::ArcGISRuntime::Authentication::OAuthUserTokenInfo *> OAuthUserCredential::tokenInfoAsync (QObject *parent = nullptr)
Returns an instance of OAuthUserTokenInfo generated by this credential, with an optional parent.
If the access token has expired, this method regenerates it. If the OAuthUserConfiguration::refreshTokenExchangeInterval is set, this method exchanges the refresh token at specified interval. While regenerating the access token or exchanging the refresh token, if the refresh token is expired, an invalid token error is returned.
This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.
See Working with QFuture for further details.