This class is deprecated. We strongly advise against using it in new code.
Detailed DescriptionAn instance of this class is available through the AuthenticationManager. It represents a cache containing credentials. All objects and tasks share this instance and could potentially reuse a credential if they need to access the same security realm.
The URL acts as the lookup key into the cache and represents one of the following:
Automatic caching happens when credentials (that is, username, password, token, or OAuth client information) are required when connecting to a secure service hosted by ArcGIS Server, ArcGIS Online, or Federated by Portal. Upon successful connection to one of these secure services, the credential is cached in the CredentialCache and reused again whenever subsequent connections are made to the secure service.
Caching happens automatically if AuthenticationManager::isCredentialCacheEnabled is enabled. In addition, the CredentialCache class contains public methods to manipulate the cache contents.
Member Function Documentation[override virtual noexcept]
CredentialCache::~CredentialCache()
Destructor.
Esri::ArcGISRuntime::Credential *CredentialCache::credential(const QUrl &url) constReturns the credential for a given url.
See also setCredential().
void CredentialCache::removeAllCredentials()Removes all credentials from the cache.
[since Esri::ArcGISRuntime 100.8]
void CredentialCache::removeAndRevokeAllCredentials()
Removes all credentials from the cache and revokes tokens if appropriate.
If any credential is used for OAuth authentication, a request is sent to revoke its OAuth token. The resultant removeAndRevokeAllCredentialsCompleted signal contains a map that will be empty if no errors occurred. If it is not empty, each entry contains a Credential for which OAuth token revocation failed and an Error indicating why it failed. All credentials are removed from the cache even if OAuth token revocation fails.
This function was introduced in Esri::ArcGISRuntime 100.8.
[signal, since Esri::ArcGISRuntime 100.8]
void CredentialCache::removeAndRevokeAllCredentialsCompleted(const QMap<Esri::ArcGISRuntime::Credential *, Esri::ArcGISRuntime::Error> &errors)
Signal emitted when removeAndRevokeAllCredentials completes.
The returned Credential objects have the CredentialCache as its parent.
This function was introduced in Esri::ArcGISRuntime 100.8.
See also Returned QObjects Parenting.
[since Esri::ArcGISRuntime 100.8]
void CredentialCache::removeAndRevokeCredential(Esri::ArcGISRuntime::Credential *credential)
Removes the given credential from the cache and revokes its token if appropriate.
If the credential is used for OAuth authentication, a request is sent to revoke its OAuth token. If the resultant removeAndRevokeCredentialCompleted signal indicates an error occurred, the error relates to the request to revoke the OAuth token. The credential is removed from the cache even if OAuth token revocation fails.
This function was introduced in Esri::ArcGISRuntime 100.8.
[signal, since Esri::ArcGISRuntime 100.8]
void CredentialCache::removeAndRevokeCredentialCompleted(const Esri::ArcGISRuntime::Error &error)
Signal emitted when removeAndRevokeCredential completes.
This function was introduced in Esri::ArcGISRuntime 100.8.
bool CredentialCache::removeCredential(const Esri::ArcGISRuntime::Credential *credential)Removes from the cache the credential and returns true
if successful.
Removes from the cache the credential for a given url and returns true
if successful.
Sets the credential for a given url and returns true
if successful.
This method will append a credential to the cache if the key for the URL does not already exist. The credential is replaced for the URL if the URL is already in the cache.
See also credential().
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4