Auf dieser Seite

QOpcUaUserTokenPolicy Class

Die OPC UA „UserTokenPolicy“. Mehr dazu...

Kopfzeile: #include <QOpcUaUserTokenPolicy>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

Öffentliche Typen

enum TokenType { Anonymous, Username, Certificate, IssuedToken }

Öffentliche Funktionen

QOpcUaUserTokenPolicy()
QOpcUaUserTokenPolicy(const QOpcUaUserTokenPolicy &rhs)
QString issuedTokenType() const
QString issuerEndpointUrl() const
QString policyId() const
QString securityPolicy() const
void setIssuedTokenType(const QString &issuedTokenType)
void setIssuerEndpointUrl(const QString &issuerEndpointUrl)
void setPolicyId(const QString &policyId)
void setSecurityPolicy(const QString &securityPolicy)
void setTokenType(QOpcUaUserTokenPolicy::TokenType tokenType)
QOpcUaUserTokenPolicy::TokenType tokenType() const
QOpcUaUserTokenPolicy &operator=(const QOpcUaUserTokenPolicy &rhs)
bool operator==(const QOpcUaUserTokenPolicy &rhs) const

Ausführliche Beschreibung

Die Benutzer-Token-Richtlinie enthält Informationen zu einem vom Server akzeptierten Benutzer-Token.

Dokumentation zum Mitgliedstyp

enum QOpcUaUserTokenPolicy::TokenType

KonstanteWertBeschreibung
QOpcUaUserTokenPolicy::Anonymous0Es ist kein Token erforderlich.
QOpcUaUserTokenPolicy::Username1Benutzername und Passwort sind erforderlich.
QOpcUaUserTokenPolicy::Certificate2Ein Client-Zertifikat ist erforderlich.
QOpcUaUserTokenPolicy::IssuedToken3Beliebiges, gemäß Web Services Security (WS-Security) definiertes Token.

Dokumentation der Mitgliedsfunktionen

QOpcUaUserTokenPolicy::QOpcUaUserTokenPolicy()

„Default“ erstellt eine Benutzer-Token-Richtlinie, für die keine Parameter festgelegt sind.

QOpcUaUserTokenPolicy::QOpcUaUserTokenPolicy(const QOpcUaUserTokenPolicy &rhs)

Erstellt eine Benutzer-Token-Richtlinie anhand von rhs.

QString QOpcUaUserTokenPolicy::issuedTokenType() const

Gibt die URI für den Token-Typ zurück.

Siehe auch setIssuedTokenType().

QString QOpcUaUserTokenPolicy::issuerEndpointUrl() const

Gibt die URL eines Token-Ausstellungsdienstes zurück.

Siehe auch „ setIssuerEndpointUrl()“.

QString QOpcUaUserTokenPolicy::policyId() const

Gibt eine vom Server zugewiesene Kennung für diese Richtlinie zurück.

Siehe auch „ setPolicyId()“.

QString QOpcUaUserTokenPolicy::securityPolicy() const

Gibt die URI der Sicherheitsrichtlinie zurück, die beim Verschlüsseln oder Signieren des Tokens für „ActivateSession“ erforderlich ist.

Die Sicherheitsrichtlinien „Basic128Rsa15“ und „Basic256“ sind veraltet und sollten nur aus Gründen der Abwärtskompatibilität verwendet werden, wenn der Server keine der derzeit als sicher geltenden Richtlinien unterstützt.

Siehe auch „ setSecurityPolicy()“.

void QOpcUaUserTokenPolicy::setIssuedTokenType(const QString &issuedTokenType)

Legt die URI für den Token-Typ auf issuedTokenType fest.

Siehe auch issuedTokenType().

void QOpcUaUserTokenPolicy::setIssuerEndpointUrl(const QString &issuerEndpointUrl)

Legt die URL des Token-Ausstellungsdienstes auf issuerEndpointUrl fest.

Siehe auch issuerEndpointUrl().

void QOpcUaUserTokenPolicy::setPolicyId(const QString &policyId)

Legt die Kennung für diese Richtlinie auf „ policyId “ fest.

Siehe auch policyId().

void QOpcUaUserTokenPolicy::setSecurityPolicy(const QString &securityPolicy)

Legt die URI der Sicherheitsrichtlinie auf securityPolicy fest.

Die Sicherheitsrichtlinien „Basic128Rsa15“ und „Basic256“ sind veraltet und sollten nur aus Gründen der Abwärtskompatibilität verwendet werden, wenn der Server keine der derzeit als sicher geltenden Richtlinien unterstützt.

Siehe auch securityPolicy().

void QOpcUaUserTokenPolicy::setTokenType(QOpcUaUserTokenPolicy::TokenType tokenType)

Legt den Typ des erforderlichen Benutzeridentitätstokens auf „ tokenType “ fest.

Siehe auch tokenType().

QOpcUaUserTokenPolicy::TokenType QOpcUaUserTokenPolicy::tokenType() const

Gibt den Typ des erforderlichen Benutzeridentitätstokens zurück.

Siehe auch „ setTokenType()“.

QOpcUaUserTokenPolicy &QOpcUaUserTokenPolicy::operator=(const QOpcUaUserTokenPolicy &rhs)

Legt die Werte aus „ rhs “ in dieser Benutzer-Token-Richtlinie fest.

bool QOpcUaUserTokenPolicy::operator==(const QOpcUaUserTokenPolicy &rhs) const

Gibt „ true “ zurück, wenn diese Benutzer-Token-Richtlinie denselben Wert wie „ rhs “ hat.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.