QOpcUaUserTokenPolicy Class

The OPC UA UserTokenPolicy. More...

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

Public Types

enum TokenType { Anonymous, Username, Certificate, IssuedToken }

Public Functions

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

Detailed Description

The user token policy contains information about an user token accepted by the server.

Member Type Documentation

enum QOpcUaUserTokenPolicy::TokenType

ConstantValueDescription
QOpcUaUserTokenPolicy::Anonymous0No token required.
QOpcUaUserTokenPolicy::Username1Username and password are required.
QOpcUaUserTokenPolicy::Certificate2A client certificate is required.
QOpcUaUserTokenPolicy::IssuedToken3Any Web Services Security (WS-Security) defined token.

Member Function Documentation

QOpcUaUserTokenPolicy::QOpcUaUserTokenPolicy()

Default constructs a user token policy with no parameters set.

QOpcUaUserTokenPolicy::QOpcUaUserTokenPolicy(const QOpcUaUserTokenPolicy &rhs)

Constructs an user token policy from rhs.

QString QOpcUaUserTokenPolicy::issuedTokenType() const

Returns the URI for the token type.

See also setIssuedTokenType().

QString QOpcUaUserTokenPolicy::issuerEndpointUrl() const

Returns the URL of a token issuing service.

See also setIssuerEndpointUrl().

QString QOpcUaUserTokenPolicy::policyId() const

Returns a server assigned identifier for this policy.

See also setPolicyId().

QString QOpcUaUserTokenPolicy::securityPolicy() const

Returns the URI of the security policy required when encrypting or signing the token for ActivateSession.

See also setSecurityPolicy().

void QOpcUaUserTokenPolicy::setIssuedTokenType(const QString &issuedTokenType)

Sets the URI for the token type to issuedTokenType.

See also issuedTokenType().

void QOpcUaUserTokenPolicy::setIssuerEndpointUrl(const QString &issuerEndpointUrl)

Sets the URL of the token issuing service to issuerEndpointUrl.

See also issuerEndpointUrl().

void QOpcUaUserTokenPolicy::setPolicyId(const QString &policyId)

Sets the identifier for this policy to policyId.

See also policyId().

void QOpcUaUserTokenPolicy::setSecurityPolicy(const QString &securityPolicy)

Sets the URI of the security policy to securityPolicy.

See also securityPolicy().

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

Sets the type of the required user identity token to tokenType.

See also tokenType().

QOpcUaUserTokenPolicy::TokenType QOpcUaUserTokenPolicy::tokenType() const

Returns the type of the required user identity token.

See also setTokenType().

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

Sets the values from rhs in this user token policy.

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

Returns true if this user token policy has the same value as rhs.