1// Copyright (C) 2015 basysKom GmbH, opensource@basyskom.com
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 QOPCUAUSERTOKENPOLICY_H
5#define QOPCUAUSERTOKENPOLICY_H
6
7#include <QtOpcUa/qopcuaglobal.h>
8
9#include <QtCore/qshareddata.h>
10#include <QtCore/qmetatype.h>
11
12QT_BEGIN_NAMESPACE
13
14class QOpcUaUserTokenPolicyData;
15class Q_OPCUA_EXPORT QOpcUaUserTokenPolicy
16{
17 Q_GADGET
18public:
19 QOpcUaUserTokenPolicy();
20 QOpcUaUserTokenPolicy(const QOpcUaUserTokenPolicy &);
21 QOpcUaUserTokenPolicy &operator=(const QOpcUaUserTokenPolicy &);
22 bool operator==(const QOpcUaUserTokenPolicy &) const;
23 ~QOpcUaUserTokenPolicy();
24
25 enum TokenType {
26 Anonymous = 0,
27 Username = 1,
28 Certificate = 2,
29 IssuedToken = 3
30 };
31 Q_ENUMS(TokenType)
32
33 QString policyId() const;
34 void setPolicyId(const QString &policyId);
35
36 QOpcUaUserTokenPolicy::TokenType tokenType() const;
37 void setTokenType(QOpcUaUserTokenPolicy::TokenType tokenType);
38
39 QString issuedTokenType() const;
40 void setIssuedTokenType(const QString &issuedTokenType);
41
42 QString issuerEndpointUrl() const;
43 void setIssuerEndpointUrl(const QString &issuerEndpointUrl);
44
45 QString securityPolicy() const;
46 void setSecurityPolicy(const QString &securityPolicy);
47
48private:
49 QSharedDataPointer<QOpcUaUserTokenPolicyData> data;
50};
51
52QT_END_NAMESPACE
53
54Q_DECLARE_METATYPE(QOpcUaUserTokenPolicy)
55
56#endif // QOPCUAUSERTOKENPOLICY_H
57

source code of qtopcua/src/opcua/client/qopcuausertokenpolicy.h