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 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | class QOpcUaUserTokenPolicyData; |
15 | class Q_OPCUA_EXPORT QOpcUaUserTokenPolicy |
16 | { |
17 | Q_GADGET |
18 | public: |
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 | |
48 | private: |
49 | QSharedDataPointer<QOpcUaUserTokenPolicyData> data; |
50 | }; |
51 | |
52 | QT_END_NAMESPACE |
53 | |
54 | Q_DECLARE_METATYPE(QOpcUaUserTokenPolicy) |
55 | |
56 | #endif // QOPCUAUSERTOKENPOLICY_H |
57 |