KVIrc 5.2.6
Developer APIs
QHttpAuthenticator Class Reference

The QHttpAuthenticator class provides an authentication object. More...

#include <qhttpauthenticator_p.h>

Public Member Functions

void detach ()
 
bool isNull () const
 
bool operator!= (const QHttpAuthenticator &other) const
 
QHttpAuthenticatoroperator= (const QAuthenticator &auth)
 
QHttpAuthenticatoroperator= (const QHttpAuthenticator &other)
 
bool operator== (const QHttpAuthenticator &other) const
 
QVariant option (const QString &opt) const
 
QVariantHash options () const
 
QString password () const
 
 QHttpAuthenticator ()
 
 QHttpAuthenticator (const QHttpAuthenticator &other)
 
QString realm () const
 
void setOption (const QString &opt, const QVariant &value)
 
void setPassword (const QString &password)
 
void setUser (const QString &user)
 
QAuthenticator toQAuthenticator ()
 
QString user () const
 
 ~QHttpAuthenticator ()
 

Private Attributes

QHttpAuthenticatorPrivated
 

Friends

class QHttpAuthenticatorPrivate
 

Detailed Description

The QHttpAuthenticator class provides an authentication object.

Since
4.3

\reentrant

\inmodule QtNetwork

The QHttpAuthenticator class is usually used in the \l{QNetworkAccessManager::}{authenticationRequired()} and \l{QNetworkAccessManager::}{proxyAuthenticationRequired()} signals of QNetworkAccessManager and QAbstractSocket. The class provides a way to pass back the required authentication information to the socket when accessing services that require authentication.

QHttpAuthenticator supports the following authentication methods: \list \o Basic \o NTLM version 1 \o Digest-MD5 \endlist

Note that, in particular, NTLM version 2 is not supported.

Constructor & Destructor Documentation

◆ QHttpAuthenticator() [1/2]

QHttpAuthenticator::QHttpAuthenticator ( )

Constructs an empty authentication object

References d, and nullptr.

Referenced by operator!=(), operator=(), operator=(), operator==(), and QHttpAuthenticator().

◆ ~QHttpAuthenticator()

QHttpAuthenticator::~QHttpAuthenticator ( )

Destructs the object

References d.

◆ QHttpAuthenticator() [2/2]

QHttpAuthenticator::QHttpAuthenticator ( const QHttpAuthenticator & other)

Constructs a copy of other.

References d, and QHttpAuthenticator().

Member Function Documentation

◆ detach()

◆ isNull()

bool QHttpAuthenticator::isNull ( ) const

Returns true if the authenticator is null.

References d.

Referenced by QHttpPrivate::_q_slotReadyRead().

◆ operator!=()

bool QHttpAuthenticator::operator!= ( const QHttpAuthenticator & other) const
inline

Returns true if this authenticator is different from other; otherwise returns false.

References operator==(), and QHttpAuthenticator().

◆ operator=() [1/2]

QHttpAuthenticator & QHttpAuthenticator::operator= ( const QAuthenticator & auth)

References d, detach(), and QHttpAuthenticator().

◆ operator=() [2/2]

QHttpAuthenticator & QHttpAuthenticator::operator= ( const QHttpAuthenticator & other)

Assigns the contents of other to this authenticator.

References d, and QHttpAuthenticator().

◆ operator==()

bool QHttpAuthenticator::operator== ( const QHttpAuthenticator & other) const

◆ option()

QVariant QHttpAuthenticator::option ( const QString & opt) const
Since
4.7 Returns the value related to option opt if it was set by the server. See \l{QHttpAuthenticator#Options} for more information on incoming options. If option opt isn't found, an invalid QVariant will be returned.
See also
options(), QHttpAuthenticator#Options

References d.

Referenced by toQAuthenticator().

◆ options()

QVariantHash QHttpAuthenticator::options ( ) const
Since
4.7 Returns all incoming options set in this QHttpAuthenticator object by parsing the server reply. See \l{QHttpAuthenticator#Options} for more information on incoming options.
See also
option(), QHttpAuthenticator#Options

References d.

◆ password()

QString QHttpAuthenticator::password ( ) const

returns the password used for authentication.

References d.

Referenced by setPassword().

◆ realm()

QString QHttpAuthenticator::realm ( ) const

returns the realm requiring authentication.

References d.

◆ setOption()

void QHttpAuthenticator::setOption ( const QString & opt,
const QVariant & value )
Since
4.7

Sets the outgoing option opt to value value. See \l{QHttpAuthenticator#Options} for more information on outgoing options.

See also
options(), option(), QHttpAuthenticator#Options

References d, and detach().

◆ setPassword()

void QHttpAuthenticator::setPassword ( const QString & password)

Sets the password used for authentication.

See also
QNetworkAccessManager::authenticationRequired()

References d, detach(), and password().

◆ setUser()

void QHttpAuthenticator::setUser ( const QString & user)

Sets the user used for authentication.

See also
QNetworkAccessManager::authenticationRequired()

References d, detach(), QHttpAuthenticatorPrivate::Ntlm, and user().

◆ toQAuthenticator()

QAuthenticator QHttpAuthenticator::toQAuthenticator ( )

References d, and option().

Referenced by QHttpPrivate::_q_slotReadyRead().

◆ user()

QString QHttpAuthenticator::user ( ) const

returns the user used for authentication.

References d.

Referenced by setUser().

Friends And Related Symbol Documentation

◆ QHttpAuthenticatorPrivate

friend class QHttpAuthenticatorPrivate
friend

Member Data Documentation

◆ d


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