C++ Based OPC UA Client/Server SDK
1.6.1.391
|
Wrapper class for the UA stack structure OpcUa_UserTokenPolicy. More...
#include <uausertokenpolicy.h>
Public Member Functions | |
UaUserTokenPolicy () | |
Constructs an instance of the class UaUserTokenPolicy with empty default values. | |
UaUserTokenPolicy (const UaUserTokenPolicy &other) | |
Constructs an instance of the class UaUserTokenPolicy with values from another UaUserTokenPolicy object. More... | |
UaUserTokenPolicy (const OpcUa_UserTokenPolicy &other) | |
Constructs an instance of the class UaUserTokenPolicy with values from another OpcUa_UserTokenPolicy structure. More... | |
UaUserTokenPolicy (const UaString &policyId, OpcUa_UserTokenType tokenType, const UaString &issuedTokenType, const UaString &issuerEndpointUrl, const UaString &securityPolicyUri) | |
Constructs an instance of the class UaUserTokenPolicy with values provided in the constructor. | |
UaUserTokenPolicy (const UaExtensionObject &extensionObject) | |
Constructs an instance of the class UaUserTokenPolicy initialized with value from a UaExtensionObject. More... | |
UaUserTokenPolicy (const OpcUa_ExtensionObject &extensionObject) | |
Constructs an instance of the class UaUserTokenPolicy initialized with value from an OpcUa_ExtensionObject structure. More... | |
~UaUserTokenPolicy () | |
Destroys the UaUserTokenPolicy object. | |
void | clear () |
Clear the data of the UaUserTokenPolicy. More... | |
bool | operator== (const UaUserTokenPolicy &other) const |
Compare two UaUserTokenPolicy for equality. More... | |
bool | operator!= (const UaUserTokenPolicy &other) const |
Compare two UaUserTokenPolicy for inequality. More... | |
UaUserTokenPolicy & | operator= (const UaUserTokenPolicy &other) |
Assignment operator. More... | |
OpcUa_UserTokenPolicy * | copy () const |
Copy UaUserTokenPolicy data to a newly allocated OpcUa_UserTokenPolicy. More... | |
void | copyTo (OpcUa_UserTokenPolicy *pDst) const |
Copy UaUserTokenPolicy data to an existing OpcUa_UserTokenPolicy structure. More... | |
void | attach (OpcUa_UserTokenPolicy *pValue) |
Attaches to an existing OpcUa_UserTokenPolicy structure. More... | |
OpcUa_UserTokenPolicy * | detach (OpcUa_UserTokenPolicy *pDst) |
Detaches the internal UserTokenPolicy structure from this class. More... | |
UaString | getPolicyId () const |
An identifier for the UserTokenPolicy assigned by the Server. More... | |
OpcUa_UserTokenType | getTokenType () const |
The type of user identity token required. More... | |
UaString | getIssuedTokenType () const |
A URI for the type of token. More... | |
UaString | getIssuerEndpointUrl () const |
An optional URL for the token issuing service. More... | |
UaString | getSecurityPolicyUri () const |
The security policy to use when encrypting or signing the UserIdentityToken when it is passed to the Server in the ActivateSession request. More... | |
void | setPolicyId (const UaString &policyId) |
An identifier for the UserTokenPolicy assigned by the Server. More... | |
void | setTokenType (OpcUa_UserTokenType tokenType) |
The type of user identity token required. More... | |
void | setIssuedTokenType (const UaString &issuedTokenType) |
A URI for the type of token. More... | |
void | setIssuerEndpointUrl (const UaString &issuerEndpointUrl) |
An optional URL for the token issuing service. More... | |
void | setSecurityPolicyUri (const UaString &securityPolicyUri) |
The security policy to use when encrypting or signing the UserIdentityToken when it is passed to the Server in the ActivateSession request. More... | |
Static Public Member Functions | |
static OpcUa_UserTokenPolicy * | clone (const OpcUa_UserTokenPolicy &source) |
Copy OpcUa_UserTokenPolicy data to a newly allocated OpcUa_UserTokenPolicy. More... | |
static void | cloneTo (const OpcUa_UserTokenPolicy &source, OpcUa_UserTokenPolicy ©) |
Copy OpcUa_UserTokenPolicy data to an existing OpcUa_UserTokenPolicy structure. More... | |
Wrapper class for the UA stack structure OpcUa_UserTokenPolicy.
This class encapsulates the native OpcUa_UserTokenPolicy structure and handles memory allocation and cleanup for you. UaUserTokenPolicy uses implicit sharing to avoid needless copying and to boost the performance. Only if you modify a shared UserTokenPolicy it creates a copy for that (copy-on-write). So assigning another UaUserTokenPolicy or passing it as parameter needs constant time and is nearly as fast as assigning a pointer.
Specifies a UserIdentityToken that a Server will accept.
UaUserTokenPolicy::UaUserTokenPolicy | ( | const UaUserTokenPolicy & | other | ) |
Constructs an instance of the class UaUserTokenPolicy with values from another UaUserTokenPolicy object.
other | the other UaUserTokenPolicy used to initialize the object |
UaUserTokenPolicy::UaUserTokenPolicy | ( | const OpcUa_UserTokenPolicy & | other | ) |
Constructs an instance of the class UaUserTokenPolicy with values from another OpcUa_UserTokenPolicy structure.
other | the other OpcUa_UserTokenPolicy used to initialize the object |
UaUserTokenPolicy::UaUserTokenPolicy | ( | const UaExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaUserTokenPolicy initialized with value from a UaExtensionObject.
extensionObject | the extension object containing the UserTokenPolicy |
UaUserTokenPolicy::UaUserTokenPolicy | ( | const OpcUa_ExtensionObject & | extensionObject | ) |
Constructs an instance of the class UaUserTokenPolicy initialized with value from an OpcUa_ExtensionObject structure.
extensionObject | the extension object containing the UserTokenPolicy |
void UaUserTokenPolicy::attach | ( | OpcUa_UserTokenPolicy * | pValue | ) |
Attaches to an existing OpcUa_UserTokenPolicy structure.
Don't manually free the attached structure afterwards, because UaUserTokenPolicy is responsible for it now.
pValue | [in] Parameter to attach to. |
void UaUserTokenPolicy::clear | ( | ) |
Clear the data of the UaUserTokenPolicy.
|
static |
Copy OpcUa_UserTokenPolicy data to a newly allocated OpcUa_UserTokenPolicy.
source | Source to clone. |
|
static |
Copy OpcUa_UserTokenPolicy data to an existing OpcUa_UserTokenPolicy structure.
source | the source of the clone operation. |
copy | the destination of the clone operation. |
OpcUa_UserTokenPolicy * UaUserTokenPolicy::copy | ( | ) | const |
Copy UaUserTokenPolicy data to a newly allocated OpcUa_UserTokenPolicy.
void UaUserTokenPolicy::copyTo | ( | OpcUa_UserTokenPolicy * | pDst | ) | const |
Copy UaUserTokenPolicy data to an existing OpcUa_UserTokenPolicy structure.
pDst | the destination of this copy operation. |
OpcUa_UserTokenPolicy * UaUserTokenPolicy::detach | ( | OpcUa_UserTokenPolicy * | pDst | ) |
Detaches the internal UserTokenPolicy structure from this class.
This way you take over the control of freeing the UserTokenPolicy data. If more than one reference exists, the data is copied to pDst instead of being detached.
pDst | [out] Pointer to an OpcUa_UserTokenPolicy structure that receives the UserTokenPolicy data. |
UaString UaUserTokenPolicy::getIssuedTokenType | ( | ) | const |
A URI for the type of token.
Part 6 of the OPC UA Specification defines URIs for common issued token types. Vendors may specify their own token.
This field may only be specified if TokenType is IssuedToken.
UaString UaUserTokenPolicy::getIssuerEndpointUrl | ( | ) | const |
An optional URL for the token issuing service.
The meaning of this value depends on the IssuedTokenType.
UaString UaUserTokenPolicy::getPolicyId | ( | ) | const |
An identifier for the UserTokenPolicy assigned by the Server.
The Client specifies this value when it constructs a UserIdentityToken that conforms to the policy.
This value is only unique within the context of a single Server.
UaString UaUserTokenPolicy::getSecurityPolicyUri | ( | ) | const |
The security policy to use when encrypting or signing the UserIdentityToken when it is passed to the Server in the ActivateSession request.
The security policy for the SecureChannel is used if this value is omitted.
OpcUa_UserTokenType UaUserTokenPolicy::getTokenType | ( | ) | const |
The type of user identity token required.
A tokenType of ANONYMOUS indicates that the Server does not require any user identification. In this case the Client application instance certificate is used as the user identification.
bool UaUserTokenPolicy::operator!= | ( | const UaUserTokenPolicy & | other | ) | const |
Compare two UaUserTokenPolicy for inequality.
other | the UaUserTokenPolicy to compare with. |
UaUserTokenPolicy & UaUserTokenPolicy::operator= | ( | const UaUserTokenPolicy & | other | ) |
bool UaUserTokenPolicy::operator== | ( | const UaUserTokenPolicy & | other | ) | const |
Compare two UaUserTokenPolicy for equality.
other | the UaUserTokenPolicy to compare with. |
void UaUserTokenPolicy::setIssuedTokenType | ( | const UaString & | issuedTokenType | ) |
A URI for the type of token.
Part 6 of the OPC UA Specification defines URIs for common issued token types. Vendors may specify their own token.
This field may only be specified if TokenType is IssuedToken.
void UaUserTokenPolicy::setIssuerEndpointUrl | ( | const UaString & | issuerEndpointUrl | ) |
An optional URL for the token issuing service.
The meaning of this value depends on the IssuedTokenType.
void UaUserTokenPolicy::setPolicyId | ( | const UaString & | policyId | ) |
An identifier for the UserTokenPolicy assigned by the Server.
The Client specifies this value when it constructs a UserIdentityToken that conforms to the policy.
This value is only unique within the context of a single Server.
void UaUserTokenPolicy::setSecurityPolicyUri | ( | const UaString & | securityPolicyUri | ) |
The security policy to use when encrypting or signing the UserIdentityToken when it is passed to the Server in the ActivateSession request.
The security policy for the SecureChannel is used if this value is omitted.
void UaUserTokenPolicy::setTokenType | ( | OpcUa_UserTokenType | tokenType | ) |
The type of user identity token required.
A tokenType of ANONYMOUS indicates that the Server does not require any user identification. In this case the Client application instance certificate is used as the user identification.