![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QAuthenticator class provides an authentication object. More...
#include <qauthenticator.h>
Public Member Functions | |
| QAuthenticator () | |
| Constructs an empty authentication object. | |
| ~QAuthenticator () | |
| Destructs the object. | |
| QAuthenticator (const QAuthenticator &other) | |
| Constructs a copy of other. | |
| QAuthenticator & | operator= (const QAuthenticator &other) |
| Assigns the contents of other to this authenticator. | |
| bool | operator== (const QAuthenticator &other) const |
Returns true if this authenticator is identical to other; otherwise returns false. | |
| bool | operator!= (const QAuthenticator &other) const |
Returns true if this authenticator is different from other; otherwise returns false. | |
| QString | user () const |
| Returns the user used for authentication. | |
| void | setUser (const QString &user) |
| Sets the user used for authentication. | |
| QString | password () const |
| Returns the password used for authentication. | |
| void | setPassword (const QString &password) |
| Sets the password used for authentication. | |
| QString | realm () const |
| Returns the realm requiring authentication. | |
| void | setRealm (const QString &realm) |
| QVariant | option (const QString &opt) const |
| QVariantHash | options () const |
| void | setOption (const QString &opt, const QVariant &value) |
| bool | isNull () const |
Returns true if the object has not been initialized. | |
| void | detach () |
| void | clear () |
Friends | |
| class | QAuthenticatorPrivate |
The QAuthenticator class provides an authentication object.
\reentrant
\inmodule QtNetwork
The QAuthenticator 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.
QAuthenticator supports the following authentication methods: \list
\target qauthenticator-options
Definition at line 18 of file qauthenticator.h.
| QAuthenticator::QAuthenticator | ( | ) |
Constructs an empty authentication object.
Definition at line 173 of file qauthenticator.cpp.
| QAuthenticator::~QAuthenticator | ( | ) |
Destructs the object.
Definition at line 181 of file qauthenticator.cpp.
| QAuthenticator::QAuthenticator | ( | const QAuthenticator & | other | ) |
Constructs a copy of other.
Definition at line 190 of file qauthenticator.cpp.
| void QAuthenticator::clear | ( | ) |
Clears all credentials and resets the object to its default uninitialized state.
Definition at line 387 of file qauthenticator.cpp.
| void QAuthenticator::detach | ( | ) |
Definition at line 295 of file qauthenticator.cpp.
| bool QAuthenticator::isNull | ( | ) | const |
Returns true if the object has not been initialized.
Returns false if non-const member functions have been called, or the content was constructed or copied from another initialized QAuthenticator object.
Definition at line 375 of file qauthenticator.cpp.
|
inline |
Returns true if this authenticator is different from other; otherwise returns false.
Definition at line 29 of file qauthenticator.h.
| QAuthenticator & QAuthenticator::operator= | ( | const QAuthenticator & | other | ) |
Assigns the contents of other to this authenticator.
Definition at line 200 of file qauthenticator.cpp.
| bool QAuthenticator::operator== | ( | const QAuthenticator & | other | ) | const |
Returns true if this authenticator is identical to other; otherwise returns false.
Definition at line 229 of file qauthenticator.cpp.
Definition at line 334 of file qauthenticator.cpp.
| QVariantHash QAuthenticator::options | ( | ) | const |
Definition at line 347 of file qauthenticator.cpp.
Referenced by testing.tools.test_runner._TestCaseRunner::_NewImageArtifact(), testing.tools.test_runner._TestCaseRunner::_RegenerateIfNeeded(), testing.tools.test_runner.TestRunner::IsSkiaGoldEnabled(), testing.tools.test_runner._TestCaseRunner::TestPixel(), and testing.tools.test_runner._TestCaseRunner::TestText().
| QString QAuthenticator::password | ( | ) | const |
Returns the password used for authentication.
Definition at line 274 of file qauthenticator.cpp.
| QString QAuthenticator::realm | ( | ) | const |
Returns the realm requiring authentication.
Definition at line 309 of file qauthenticator.cpp.
Sets the outgoing option opt to value value. See the \l{QAuthenticator#qauthenticator-options}{Options section} for more information on outgoing options.
Definition at line 360 of file qauthenticator.cpp.
Sets the password used for authentication.
Definition at line 284 of file qauthenticator.cpp.
Definition at line 317 of file qauthenticator.cpp.
Sets the user used for authentication.
Definition at line 262 of file qauthenticator.cpp.
| QString QAuthenticator::user | ( | ) | const |
Returns the user used for authentication.
Definition at line 252 of file qauthenticator.cpp.
|
friend |
Definition at line 49 of file qauthenticator.h.