KD SOAP  1.10.0
KDSoapAuthentication.h
1 /****************************************************************************
2 **
3 ** This file is part of the KD Soap library.
4 **
5 ** SPDX-FileCopyrightText: 2010-2020 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDAB-KDSoap OR LicenseRef-KDAB-KDSoap-US
8 **
9 ** Licensees holding valid commercial KD Soap licenses may use this file in
10 ** accordance with the KD Soap Commercial License Agreement provided with
11 ** the Software.
12 **
13 ** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 **
15 ****************************************************************************/
16 #ifndef KDSOAPAUTHENTICATION_H
17 #define KDSOAPAUTHENTICATION_H
18 
19 #include "KDSoapGlobal.h"
20 #include <QtCore/QUrl>
21 QT_BEGIN_NAMESPACE
22 class QAuthenticator;
23 class QDateTime;
24 class QNetworkReply;
25 class QXmlStreamWriter;
26 QT_END_NAMESPACE
27 class KDSoapNamespacePrefixes;
28 
36 class KDSOAP_EXPORT KDSoapAuthentication
37 {
38 public:
39  friend class KDSoapMessageWriter;
40  friend class KDSoapClientInterfacePrivate;
41  friend class KDSoapThreadTask;
42 
55 
59  void setUser(const QString &user);
63  QString user() const;
64 
68  void setPassword(const QString &password);
72  QString password() const;
73 
77  void setUsePasswordDigest(const bool usePasswordDigest);
81  bool usePasswordDigest() const;
82 
89  void setUseWSUsernameToken(bool useWSUsernameToken);
94  bool useWSUsernameToken() const;
95 
101  void setOverrideWSUsernameCreatedTime(QDateTime overrideWSUsernameCreatedTime);
106  QDateTime overrideWSUsernameCreatedTime() const;
107 
113  void setOverrideWSUsernameNonce(QByteArray overrideWSUsernameNonce);
118  QByteArray overrideWSUsernameNonce() const;
119 
124  bool hasAuth() const;
125 
129  KDSoapAuthentication &operator=(const KDSoapAuthentication &other);
130 
131 private:
135  void handleAuthenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator);
136 
140  bool hasWSUsernameTokenHeader() const;
141 
145  void writeWSUsernameTokenHeader(QXmlStreamWriter &writer) const;
146 
147 private:
148  class Private;
149  Private *const d;
150 };
151 
152 #endif // KDSOAPAUTHENTICATION_H
Definition: KDSoapAuthentication.h:36

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/