Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qauthenticator.h
Go to the documentation of this file.
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
12QT_BEGIN_NAMESPACE
13
14
15class QAuthenticatorPrivate;
16class QUrl;
17
18class Q_NETWORK_EXPORT QAuthenticator
19{
20 Q_GADGET
21public:
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
47 void clear() noexcept;
48private:
49 friend class QAuthenticatorPrivate;
50 QAuthenticatorPrivate *d;
51};
52
53QT_END_NAMESPACE
54
55#endif
The QAuthenticator class provides an authentication object.
QString errorDetail(QNetworkReply::NetworkError errorCode, QIODevice *socket, const QString &extraDetail=QString())
qint64 uncompressedBytesAvailableNextBlock(const QHttpNetworkReply &reply) const
bool shouldEmitChannelError(QIODevice *socket)
void createAuthorization(QIODevice *socket, QHttpNetworkRequest &request)
void emitReplyError(QIODevice *socket, QHttpNetworkReply *reply, QNetworkReply::NetworkError errorCode)
QUrl parseRedirectResponse(QIODevice *socket, QHttpNetworkReply *reply)
QHttpNetworkRequest predictNextRequest() const
void prepareRequest(HttpMessagePair &request)
QHttpNetworkConnectionPrivate(quint16 connectionCount, const QString &hostName, quint16 port, bool encrypt, bool isLocalSocket, QHttpNetworkConnection::ConnectionType type)
void emitProxyAuthenticationRequired(const QHttpNetworkConnectionChannel *chan, const QNetworkProxy &proxy, QAuthenticator *auth)
NetworkLayerPreferenceState networkLayerState
void copyCredentials(int fromChannel, QAuthenticator *auth, bool isProxy)
std::shared_ptr< QSslContext > sslContext
void networkLayerDetected(QAbstractSocket::NetworkLayerProtocol protocol)
void requeueRequest(const HttpMessagePair &pair)
QList< HttpMessagePair > lowPriorityQueue
void removeReply(QHttpNetworkReply *reply)
void _q_hostLookupFinished(const QHostInfo &info)
QHttpNetworkReply * predictNextRequestsReply() const
QList< HttpMessagePair > highPriorityQueue
void updateChannel(int i, const HttpMessagePair &messagePair)
bool handleAuthenticateChallenge(QIODevice *socket, QHttpNetworkReply *reply, bool isProxy, bool &resend)
QHttpNetworkReply * queueRequest(const QHttpNetworkRequest &request)
QHttpNetworkConnectionChannel *const channels
void readMoreLater(QHttpNetworkReply *reply)
bool fillPipeline(QList< HttpMessagePair > &queue, QHttpNetworkConnectionChannel &channel)
int indexOf(QIODevice *socket) const
qint64 uncompressedBytesAvailable(const QHttpNetworkReply &reply) const
static ParseRedirectResult parseRedirectResponse(QHttpNetworkReply *reply)
QT_REQUIRE_CONFIG(http)
std::pair< QHttpNetworkRequest, QHttpNetworkReply * > HttpMessagePair