Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qauthenticator_p.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
4#ifndef QAUTHENTICATOR_P_H
5#define QAUTHENTICATOR_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtNetwork/private/qtnetworkglobal_p.h>
19#include <qhash.h>
20#include <qbytearray.h>
21#include <qscopedpointer.h>
22#include <qstring.h>
23#include <qauthenticator.h>
24#include <qvariant.h>
25
27
28class QHttpResponseHeader;
29class QHttpHeaders;
30#if QT_CONFIG(sspi) // SSPI
31class QSSPIWindowsHandles;
32#elif QT_CONFIG(gssapi) // GSSAPI
33class QGssApiHandles;
34#endif
35
36class Q_NETWORK_EXPORT QAuthenticatorPrivate
37{
38public:
39 enum Method { None, Basic, Negotiate, Ntlm, DigestMd5, };
42
50#if QT_CONFIG(sspi) // SSPI
51 QScopedPointer<QSSPIWindowsHandles> sspiWindowsHandles;
52#elif QT_CONFIG(gssapi) // GSSAPI
53 QScopedPointer<QGssApiHandles> gssApiHandles;
54#endif
55 bool hasFailed; //credentials have been tried but rejected by server.
56
65
66 // digest specific
69
70 // ntlm specific
73
75
76 inline static QAuthenticatorPrivate *getPrivate(QAuthenticator &auth) { return auth.d; }
77 inline static const QAuthenticatorPrivate *getPrivate(const QAuthenticator &auth) { return auth.d; }
78
79 QByteArray digestMd5Response(QByteArrayView challenge, QByteArrayView method,
81 static QHash<QByteArray, QByteArray>
82 parseDigestAuthenticationChallenge(QByteArrayView challenge);
83
84 void parseHttpResponse(const QHttpHeaders &headers, bool isProxy, QStringView host);
85 void updateCredentials();
86
87 static bool isMethodSupported(QByteArrayView method);
88};
89
90
92
93#endif
static QAuthenticatorPrivate * getPrivate(QAuthenticator &auth)
static const QAuthenticatorPrivate * getPrivate(const QAuthenticator &auth)
The QAuthenticator class provides an authentication object.
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qstringview.h:78
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
@ None
Definition qhash.cpp:531
@ Invalid
GLsizei const GLchar *const * path