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
4#ifndef QAUTHENTICATOR_H
5#define QAUTHENTICATOR_H
6
7#include <QtNetwork/qtnetworkglobal.h>
8#include <QtCore/qstring.h>
9#include <QtCore/qvariant.h>
10
11QT_BEGIN_NAMESPACE
12
13
14class QAuthenticatorPrivate;
15class QUrl;
16
17class Q_NETWORK_EXPORT QAuthenticator
18{
19public:
20 QAuthenticator();
21 ~QAuthenticator();
22
23 QAuthenticator(const QAuthenticator &other);
24 QAuthenticator &operator=(const QAuthenticator &other);
25
26 bool operator==(const QAuthenticator &other) const;
27 inline bool operator!=(const QAuthenticator &other) const { return !operator==(other); }
28
29 QString user() const;
30 void setUser(const QString &user);
31
32 QString password() const;
33 void setPassword(const QString &password);
34
35 QString realm() const;
36 void setRealm(const QString &realm);
37
38 QVariant option(const QString &opt) const;
39 QVariantHash options() const;
40 void setOption(const QString &opt, const QVariant &value);
41
42 bool isNull() const;
43 void detach();
44private:
45 friend class QAuthenticatorPrivate;
46 QAuthenticatorPrivate *d;
47};
48
49QT_END_NAMESPACE
50
51#endif
52

source code of qtbase/src/network/kernel/qauthenticator.h