Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QAuthenticatorPrivate Class Reference

#include <qauthenticator_p.h>

+ Collaboration diagram for QAuthenticatorPrivate:

Public Types

enum  Method {
  None , Basic , Negotiate , Ntlm ,
  DigestMd5
}
 
enum  Phase {
  Start , Phase1 , Phase2 , Done ,
  Invalid
}
 

Public Member Functions

 QAuthenticatorPrivate ()
 
 ~QAuthenticatorPrivate ()
 
QByteArray calculateResponse (QByteArrayView method, QByteArrayView path, QStringView host)
 
QByteArray digestMd5Response (QByteArrayView challenge, QByteArrayView method, QByteArrayView path)
 
void parseHttpResponse (const QHttpHeaders &headers, bool isProxy, QStringView host)
 
void updateCredentials ()
 

Static Public Member Functions

static QAuthenticatorPrivategetPrivate (QAuthenticator &auth)
 
static const QAuthenticatorPrivategetPrivate (const QAuthenticator &auth)
 
static QHash< QByteArray, QByteArrayparseDigestAuthenticationChallenge (QByteArrayView challenge)
 
static bool isMethodSupported (QByteArrayView method)
 

Public Attributes

QString user
 
QString extractedUser
 
QString password
 
QVariantHash options
 
Method method
 
QString realm
 
QByteArray challenge
 
bool hasFailed
 
Phase phase
 
QByteArray cnonce
 
int nonceCount
 
QString workstation
 
QString userDomain
 

Detailed Description

Definition at line 36 of file qauthenticator_p.h.

Member Enumeration Documentation

◆ Method

Enumerator
None 
Basic 
Negotiate 
Ntlm 
DigestMd5 

Definition at line 39 of file qauthenticator_p.h.

◆ Phase

Enumerator
Start 
Phase1 
Phase2 
Done 
Invalid 

Definition at line 57 of file qauthenticator_p.h.

Constructor & Destructor Documentation

◆ QAuthenticatorPrivate()

QAuthenticatorPrivate::QAuthenticatorPrivate ( )

Definition at line 377 of file qauthenticator.cpp.

References cnonce, QCryptographicHash::hash(), QCryptographicHash::Md5, nonceCount, QByteArray::number(), and QRandomGenerator::system().

+ Here is the call graph for this function:

◆ ~QAuthenticatorPrivate()

QAuthenticatorPrivate::~QAuthenticatorPrivate ( )
default

Member Function Documentation

◆ calculateResponse()

QByteArray QAuthenticatorPrivate::calculateResponse ( QByteArrayView method,
QByteArrayView path,
QStringView host )

Definition at line 542 of file qauthenticator.cpp.

References Basic, challenge, DigestMd5, digestMd5Response(), Done, QByteArray::fromBase64(), QByteArray::isEmpty(), QString::isEmpty(), method, Negotiate, None, Ntlm, password, phase, Phase2, Q_UNUSED, qNtlmPhase1(), qNtlmPhase3(), qWarning, QByteArray::toBase64(), and user.

+ Here is the call graph for this function:

◆ digestMd5Response()

QByteArray QAuthenticatorPrivate::digestMd5Response ( QByteArrayView challenge,
QByteArrayView method,
QByteArrayView path )

Definition at line 799 of file qauthenticator.cpp.

References challenge, cnonce, digestMd5ResponseHelper(), QByteArray::isEmpty(), method, nonceCount, QByteArray::number(), options, parseDigestAuthenticationChallenge(), password, realm, QString::toLatin1(), user, and QHash< Key, T >::value().

Referenced by calculateResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPrivate() [1/2]

static const QAuthenticatorPrivate * QAuthenticatorPrivate::getPrivate ( const QAuthenticator & auth)
inlinestatic

Definition at line 77 of file qauthenticator_p.h.

◆ getPrivate() [2/2]

static QAuthenticatorPrivate * QAuthenticatorPrivate::getPrivate ( QAuthenticator & auth)
inlinestatic

◆ isMethodSupported()

bool QAuthenticatorPrivate::isMethodSupported ( QByteArrayView method)
static

Definition at line 413 of file qauthenticator.cpp.

References Qt::CaseInsensitive, method, methods, and Q_ASSERT.

Referenced by QHttpNetworkConnectionPrivate::handleAuthenticateChallenge().

+ Here is the caller graph for this function:

◆ parseDigestAuthenticationChallenge()

QHash< QByteArray, QByteArray > QAuthenticatorPrivate::parseDigestAuthenticationChallenge ( QByteArrayView challenge)
static

Definition at line 661 of file qauthenticator.cpp.

References challenge, containsAuth(), d, QByteArray::data(), options, quote(), QByteArray::size(), and QHash< Key, T >::value().

Referenced by digestMd5Response(), parseHttpResponse(), and verifyDigestMD5().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseHttpResponse()

void QAuthenticatorPrivate::parseHttpResponse ( const QHttpHeaders & headers,
bool isProxy,
QStringView host )

◆ updateCredentials()

void QAuthenticatorPrivate::updateCredentials ( )

Definition at line 390 of file qauthenticator.cpp.

References QString::clear(), extractedUser, QString::indexOf(), QString::left(), method, QString::mid(), Ntlm, realm, user, and userDomain.

Referenced by parseHttpResponse(), and QAuthenticator::setUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ challenge

QByteArray QAuthenticatorPrivate::challenge

◆ cnonce

QByteArray QAuthenticatorPrivate::cnonce

Definition at line 67 of file qauthenticator_p.h.

Referenced by QAuthenticatorPrivate(), and digestMd5Response().

◆ extractedUser

QString QAuthenticatorPrivate::extractedUser

Definition at line 44 of file qauthenticator_p.h.

Referenced by QAuthenticator::operator=(), and updateCredentials().

◆ hasFailed

bool QAuthenticatorPrivate::hasFailed

Definition at line 55 of file qauthenticator_p.h.

◆ method

◆ nonceCount

int QAuthenticatorPrivate::nonceCount

Definition at line 68 of file qauthenticator_p.h.

Referenced by QAuthenticatorPrivate(), digestMd5Response(), and parseHttpResponse().

◆ options

◆ password

◆ phase

Phase QAuthenticatorPrivate::phase

◆ realm

◆ user

◆ userDomain

QString QAuthenticatorPrivate::userDomain

Definition at line 72 of file qauthenticator_p.h.

Referenced by QAuthenticator::operator=(), and updateCredentials().

◆ workstation

QString QAuthenticatorPrivate::workstation

Definition at line 71 of file qauthenticator_p.h.

Referenced by QAuthenticator::operator=().


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