![]() |
KVIrc 5.2.6
Developer APIs
|
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 |
QHttpAuthenticator & | operator= (const QAuthenticator &auth) |
QHttpAuthenticator & | operator= (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 | |
QHttpAuthenticatorPrivate * | d |
Friends | |
class | QHttpAuthenticatorPrivate |
The QHttpAuthenticator class provides an authentication object.
\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.
QHttpAuthenticator::QHttpAuthenticator | ( | ) |
Constructs an empty authentication object
Referenced by operator!=(), operator=(), operator=(), operator==(), and QHttpAuthenticator().
QHttpAuthenticator::~QHttpAuthenticator | ( | ) |
Destructs the object
References d.
QHttpAuthenticator::QHttpAuthenticator | ( | const QHttpAuthenticator & | other | ) |
Constructs a copy of other.
References d, and QHttpAuthenticator().
void QHttpAuthenticator::detach | ( | ) |
References d, QHttpAuthenticatorPrivate, and QHttpAuthenticatorPrivate::Start.
Referenced by QHttpPrivate::_q_slotReadyRead(), operator=(), setOption(), setPassword(), and setUser().
bool QHttpAuthenticator::isNull | ( | ) | const |
Returns true if the authenticator is null.
References d.
Referenced by QHttpPrivate::_q_slotReadyRead().
|
inline |
Returns true if this authenticator is different from other; otherwise returns false.
References operator==(), and QHttpAuthenticator().
QHttpAuthenticator & QHttpAuthenticator::operator= | ( | const QAuthenticator & | auth | ) |
References d, detach(), and QHttpAuthenticator().
QHttpAuthenticator & QHttpAuthenticator::operator= | ( | const QHttpAuthenticator & | other | ) |
Assigns the contents of other to this authenticator.
References d, and QHttpAuthenticator().
bool QHttpAuthenticator::operator== | ( | const QHttpAuthenticator & | other | ) | const |
Returns true if this authenticator is identical to other; otherwise returns false.
References d, QHttpAuthenticatorPrivate::method, QHttpAuthenticatorPrivate::options, QHttpAuthenticatorPrivate::password, QHttpAuthenticator(), QHttpAuthenticatorPrivate::realm, and QHttpAuthenticatorPrivate::user.
Referenced by operator!=().
QVariant QHttpAuthenticator::option | ( | const QString & | opt | ) | const |
References d.
Referenced by toQAuthenticator().
QVariantHash QHttpAuthenticator::options | ( | ) | const |
References d.
QString QHttpAuthenticator::password | ( | ) | const |
QString QHttpAuthenticator::realm | ( | ) | const |
returns the realm requiring authentication.
References d.
void QHttpAuthenticator::setOption | ( | const QString & | opt, |
const QVariant & | value ) |
void QHttpAuthenticator::setPassword | ( | const QString & | password | ) |
Sets the password used for authentication.
References d, detach(), and password().
void QHttpAuthenticator::setUser | ( | const QString & | user | ) |
Sets the user used for authentication.
References d, detach(), QHttpAuthenticatorPrivate::Ntlm, and user().
QAuthenticator QHttpAuthenticator::toQAuthenticator | ( | ) |
Referenced by QHttpPrivate::_q_slotReadyRead().
QString QHttpAuthenticator::user | ( | ) | const |
|
friend |
References QHttpAuthenticatorPrivate.
Referenced by detach(), and QHttpAuthenticatorPrivate.
|
private |
Referenced by detach(), QHttpAuthenticatorPrivate::getPrivate(), QHttpAuthenticatorPrivate::getPrivate(), isNull(), operator=(), operator=(), operator==(), option(), options(), password(), QHttpAuthenticator(), QHttpAuthenticator(), realm(), setOption(), setPassword(), setUser(), toQAuthenticator(), user(), and ~QHttpAuthenticator().