| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | // Qt-Security score:significant reason:default |
| 4 | |
| 5 | #ifndef QAUTHENTICATOR_H |
| 6 | #define QAUTHENTICATOR_H |
| 7 | |
| 8 | #include <QtNetwork/qtnetworkglobal.h> |
| 9 | #include <QtCore/qstring.h> |
| 10 | #include <QtCore/qvariant.h> |
| 11 | |
| 12 | QT_BEGIN_NAMESPACE |
| 13 | |
| 14 | |
| 15 | class QAuthenticatorPrivate; |
| 16 | class QUrl; |
| 17 | |
| 18 | class Q_NETWORK_EXPORT QAuthenticator |
| 19 | { |
| 20 | Q_GADGET |
| 21 | public: |
| 22 | QAuthenticator(); |
| 23 | ~QAuthenticator(); |
| 24 | |
| 25 | QAuthenticator(const QAuthenticator &other); |
| 26 | QAuthenticator &operator=(const QAuthenticator &other); |
| 27 | |
| 28 | bool operator==(const QAuthenticator &other) const; |
| 29 | inline bool operator!=(const QAuthenticator &other) const { return !operator==(other); } |
| 30 | |
| 31 | QString user() const; |
| 32 | void setUser(const QString &user); |
| 33 | |
| 34 | QString password() const; |
| 35 | void setPassword(const QString &password); |
| 36 | |
| 37 | QString realm() const; |
| 38 | void setRealm(const QString &realm); |
| 39 | |
| 40 | QVariant option(const QString &opt) const; |
| 41 | QVariantHash options() const; |
| 42 | void setOption(const QString &opt, const QVariant &value); |
| 43 | |
| 44 | bool isNull() const; |
| 45 | void detach(); |
| 46 | private: |
| 47 | friend class QAuthenticatorPrivate; |
| 48 | QAuthenticatorPrivate *d; |
| 49 | }; |
| 50 | |
| 51 | QT_END_NAMESPACE |
| 52 | |
| 53 | #endif |
| 54 |
