|  | Qt 6.x
    The Qt SDK | 
#include <qnetworkaccessauthenticationmanager_p.h>
 Collaboration diagram for QNetworkAccessAuthenticationManager:
 Collaboration diagram for QNetworkAccessAuthenticationManager:| Public Member Functions | |
| QNetworkAccessAuthenticationManager () | |
| void | cacheCredentials (const QUrl &url, const QAuthenticator *auth) | 
| QNetworkAuthenticationCredential | fetchCachedCredentials (const QUrl &url, const QAuthenticator *auth=nullptr) | 
| Fetch the credential data from the credential cache. | |
| void | cacheProxyCredentials (const QNetworkProxy &proxy, const QAuthenticator *auth) | 
| QNetworkAuthenticationCredential | fetchCachedProxyCredentials (const QNetworkProxy &proxy, const QAuthenticator *auth=nullptr) | 
| void | clearCache () | 
| Protected Attributes | |
| QNetworkAccessCache | authenticationCache | 
| QMutex | mutex | 
Definition at line 49 of file qnetworkaccessauthenticationmanager_p.h.
| 
 | inline | 
Definition at line 52 of file qnetworkaccessauthenticationmanager_p.h.
| void QNetworkAccessAuthenticationManager::cacheCredentials | ( | const QUrl & | url, | 
| const QAuthenticator * | auth | ||
| ) | 
Definition at line 194 of file qnetworkaccessauthenticationmanager.cpp.
References QNetworkAccessCache::addEntry(), authenticationCache, authenticationKey(), copy(), QString::fromLatin1(), QNetworkAccessCache::hasEntry(), QNetworkAuthenticationCache::insert(), QAuthenticator::isNull(), mutex, QAuthenticator::password(), Q_ASSERT, QAuthenticator::realm(), QNetworkAccessCache::releaseEntry(), QNetworkAccessCache::requestEntryNow(), url, and QAuthenticator::user().
 Here is the call graph for this function:
 Here is the call graph for this function:| void QNetworkAccessAuthenticationManager::cacheProxyCredentials | ( | const QNetworkProxy & | proxy, | 
| const QAuthenticator * | auth | ||
| ) | 
Definition at line 116 of file qnetworkaccessauthenticationmanager.cpp.
References QNetworkAccessCache::addEntry(), authenticationCache, QString::clear(), QNetworkProxy::DefaultProxy, QNetworkAuthenticationCache::insert(), QString::isEmpty(), QByteArray::isEmpty(), QString::isNull(), mutex, QNetworkProxy::NoProxy, QAuthenticator::password(), proxy, proxyAuthenticationKey(), Q_ASSERT, QAuthenticator::realm(), QNetworkProxy::setUser(), QAuthenticator::user(), and QNetworkProxy::user().
 Here is the call graph for this function:
 Here is the call graph for this function:| void QNetworkAccessAuthenticationManager::clearCache | ( | ) | 
Definition at line 267 of file qnetworkaccessauthenticationmanager.cpp.
References authenticationCache, and QNetworkAccessCache::clear().
 Here is the call graph for this function:
 Here is the call graph for this function:| QNetworkAuthenticationCredential QNetworkAccessAuthenticationManager::fetchCachedCredentials | ( | const QUrl & | url, | 
| const QAuthenticator * | authentication = nullptr | ||
| ) | 
Fetch the credential data from the credential cache.
If auth is 0 (as it is when called from createRequest()), this will try to look up with an empty realm. That fails in most cases for HTTP (because the realm is seldom empty for HTTP challenges). In any case, QHttpNetworkConnection never sends the credentials on the first attempt: it needs to find out what authentication methods the server supports.
For FTP, realm is always empty.
Definition at line 241 of file qnetworkaccessauthenticationmanager.cpp.
References authenticationCache, authenticationKey(), QNetworkAuthenticationCache::findClosestMatch(), QNetworkAccessCache::hasEntry(), QString::isEmpty(), mutex, QUrl::password(), QUrl::path(), QAuthenticator::realm(), QNetworkAccessCache::releaseEntry(), QNetworkAccessCache::requestEntryNow(), ret, and url.
 Here is the call graph for this function:
 Here is the call graph for this function:| QNetworkAuthenticationCredential QNetworkAccessAuthenticationManager::fetchCachedProxyCredentials | ( | const QNetworkProxy & | proxy, | 
| const QAuthenticator * | auth = nullptr | ||
| ) | 
Definition at line 160 of file qnetworkaccessauthenticationmanager.cpp.
References QNetworkProxy::applicationProxy(), authenticationCache, QNetworkProxy::DefaultProxy, QNetworkAuthenticationCache::findClosestMatch(), QNetworkAccessCache::hasEntry(), QString::isEmpty(), QByteArray::isEmpty(), QNetworkAuthenticationCredential::isNull(), mutex, QNetworkProxy::password(), proxy, proxyAuthenticationKey(), Q_ASSERT_X, QAuthenticator::realm(), QNetworkAccessCache::releaseEntry(), QNetworkAccessCache::requestEntryNow(), and QNetworkProxy::type().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | protected | 
Definition at line 67 of file qnetworkaccessauthenticationmanager_p.h.
Referenced by cacheCredentials(), cacheProxyCredentials(), clearCache(), fetchCachedCredentials(), and fetchCachedProxyCredentials().
| 
 | protected | 
Definition at line 68 of file qnetworkaccessauthenticationmanager_p.h.
Referenced by cacheCredentials(), cacheProxyCredentials(), fetchCachedCredentials(), and fetchCachedProxyCredentials().