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

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-soap/