KVIrc
4.9.2
DeveloperAPIs
|
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 QHttpAuthenticator &other) |
QHttpAuthenticator & | operator= (const QAuthenticator &auth) |
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.
QtNetwork
The QHttpAuthenticator class is usually used in the {QNetworkAccessManager::}{authenticationRequired()} and {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: Basic NTLM version 1 Digest-MD5
Note that, in particular, NTLM version 2 is not supported.
QHttpAuthenticator::QHttpAuthenticator | ( | ) |
Constructs an empty authentication object
QHttpAuthenticator::~QHttpAuthenticator | ( | ) |
Destructs the object
References d, and QHttpAuthenticatorPrivate::ref.
QHttpAuthenticator::QHttpAuthenticator | ( | const QHttpAuthenticator & | other | ) |
Constructs a copy of other.
References d, and QHttpAuthenticatorPrivate::ref.
void QHttpAuthenticator::detach | ( | ) |
References d, QHttpAuthenticatorPrivate::phase, QHttpAuthenticatorPrivate, QHttpAuthenticatorPrivate::ref, 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==().
QHttpAuthenticator & QHttpAuthenticator::operator= | ( | const QHttpAuthenticator & | other | ) |
Assigns the contents of other to this authenticator.
References d, and QHttpAuthenticatorPrivate::ref.
QHttpAuthenticator & QHttpAuthenticator::operator= | ( | const QAuthenticator & | auth | ) |
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, QHttpAuthenticatorPrivate::realm, and QHttpAuthenticatorPrivate::user.
Referenced by operator!=().
QVariant QHttpAuthenticator::option | ( | const QString & | opt | ) | const |
References d, and QHttpAuthenticatorPrivate::options.
Referenced by toQAuthenticator().
QVariantHash QHttpAuthenticator::options | ( | ) | const |
References d, and QHttpAuthenticatorPrivate::options.
QString QHttpAuthenticator::password | ( | ) | const |
returns the password used for authentication.
References d, and QHttpAuthenticatorPrivate::password.
Referenced by setPassword().
QString QHttpAuthenticator::realm | ( | ) | const |
returns the realm requiring authentication.
References d, and QHttpAuthenticatorPrivate::realm.
void QHttpAuthenticator::setOption | ( | const QString & | opt, |
const QVariant & | value | ||
) |
Sets the outgoing option opt to value value. See {QHttpAuthenticator::Options} for more information on outgoing options.
References d, detach(), and QHttpAuthenticatorPrivate::options.
void QHttpAuthenticator::setPassword | ( | const QString & | password | ) |
Sets the password used for authentication.
References d, detach(), password(), and QHttpAuthenticatorPrivate::password.
void QHttpAuthenticator::setUser | ( | const QString & | user | ) |
Sets the user used for authentication.
References d, detach(), QHttpAuthenticatorPrivate::extractedUser, QHttpAuthenticatorPrivate::method, QHttpAuthenticatorPrivate::Ntlm, QHttpAuthenticatorPrivate::realm, user(), QHttpAuthenticatorPrivate::user, and QHttpAuthenticatorPrivate::userDomain.
QAuthenticator QHttpAuthenticator::toQAuthenticator | ( | ) |
References d, option(), QHttpAuthenticatorPrivate::options, QHttpAuthenticatorPrivate::password, and QHttpAuthenticatorPrivate::user.
Referenced by QHttpPrivate::_q_slotReadyRead().
QString QHttpAuthenticator::user | ( | ) | const |
returns the user used for authentication.
References d, and QHttpAuthenticatorPrivate::user.
Referenced by setUser().
|
friend |
Referenced by detach().
|
private |