Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QNetworkAccessAuthenticationManager Class Reference

#include <qnetworkaccessauthenticationmanager_p.h>

+ 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
 

Detailed Description

Definition at line 49 of file qnetworkaccessauthenticationmanager_p.h.

Constructor & Destructor Documentation

◆ QNetworkAccessAuthenticationManager()

QNetworkAccessAuthenticationManager::QNetworkAccessAuthenticationManager ( )
inline

Definition at line 52 of file qnetworkaccessauthenticationmanager_p.h.

Member Function Documentation

◆ cacheCredentials()

void QNetworkAccessAuthenticationManager::cacheCredentials ( const QUrl & url,
const QAuthenticator * auth )

Definition at line 193 of file qnetworkaccessauthenticationmanager.cpp.

◆ cacheProxyCredentials()

void QNetworkAccessAuthenticationManager::cacheProxyCredentials ( const QNetworkProxy & proxy,
const QAuthenticator * auth )

Definition at line 115 of file qnetworkaccessauthenticationmanager.cpp.

◆ clearCache()

void QNetworkAccessAuthenticationManager::clearCache ( )

Definition at line 266 of file qnetworkaccessauthenticationmanager.cpp.

◆ fetchCachedCredentials()

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 240 of file qnetworkaccessauthenticationmanager.cpp.

◆ fetchCachedProxyCredentials()

QNetworkAuthenticationCredential QNetworkAccessAuthenticationManager::fetchCachedProxyCredentials ( const QNetworkProxy & proxy,
const QAuthenticator * auth = nullptr )

Definition at line 159 of file qnetworkaccessauthenticationmanager.cpp.

References QNetworkAuthenticationCredential::isNull().

+ Here is the call graph for this function:

Member Data Documentation

◆ authenticationCache

QNetworkAccessCache QNetworkAccessAuthenticationManager::authenticationCache
protected

Definition at line 67 of file qnetworkaccessauthenticationmanager_p.h.

◆ mutex

QMutex QNetworkAccessAuthenticationManager::mutex
protected

Definition at line 68 of file qnetworkaccessauthenticationmanager_p.h.


The documentation for this class was generated from the following files: