KD SOAP  1.9.1
KDSoapAuthentication.h
1 /****************************************************************************
2 ** Copyright (C) 2010-2020 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com.
3 ** All rights reserved.
4 **
5 ** This file is part of the KD Soap library.
6 **
7 ** Licensees holding valid commercial KD Soap licenses may use this file in
8 ** accordance with the KD Soap Commercial License Agreement provided with
9 ** the Software.
10 **
11 **
12 ** This file may be distributed and/or modified under the terms of the
13 ** GNU Lesser General Public License version 2.1 and version 3 as published by the
14 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
15 **
16 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
17 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 **
19 ** Contact info@kdab.com if any conditions of this licensing are not
20 ** clear to you.
21 **
22 **********************************************************************/
23 #ifndef KDSOAPAUTHENTICATION_H
24 #define KDSOAPAUTHENTICATION_H
25 
26 #include "KDSoapGlobal.h"
27 #include <QtCore/QUrl>
28 QT_BEGIN_NAMESPACE
29 class QAuthenticator;
30 class QDateTime;
31 class QNetworkReply;
32 class QXmlStreamWriter;
33 QT_END_NAMESPACE
34 class KDSoapNamespacePrefixes;
35 
43 class KDSOAP_EXPORT KDSoapAuthentication
44 {
45 public:
46  friend class KDSoapMessageWriter;
47  friend class KDSoapClientInterfacePrivate;
48  friend class KDSoapThreadTask;
49 
62 
66  void setUser(const QString &user);
70  QString user() const;
71 
75  void setPassword(const QString &password);
79  QString password() const;
80 
87  void setUseWSUsernameToken(bool useWSUsernameToken);
92  bool useWSUsernameToken() const;
93 
99  void setOverrideWSUsernameCreatedTime(QDateTime overrideWSUsernameCreatedTime);
104  QDateTime overrideWSUsernameCreatedTime() const;
105 
111  void setOverrideWSUsernameNonce(QByteArray overrideWSUsernameNonce);
116  QByteArray overrideWSUsernameNonce() const;
117 
122  bool hasAuth() const;
123 
127  KDSoapAuthentication &operator=(const KDSoapAuthentication &other);
128 
129 private:
133  void handleAuthenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator);
134 
138  bool hasWSUsernameTokenHeader() const;
139 
143  void writeWSUsernameTokenHeader(QXmlStreamWriter &writer) const;
144 
145 private:
146  class Private;
147  Private *const d;
148 };
149 
150 #endif // KDSOAPAUTHENTICATION_H
Definition: KDSoapAuthentication.h:43

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/