C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537

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...
 
UaUserTokenPolicyoperator= (const UaUserTokenPolicy &other)
 Assignment operator. More...
 
OpcUa_UserTokenPolicycopy () 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_UserTokenPolicydetach (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_UserTokenPolicyclone (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)
 Copy OpcUa_UserTokenPolicy data to an existing OpcUa_UserTokenPolicy structure. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

UaUserTokenPolicy::UaUserTokenPolicy ( const UaUserTokenPolicy other)

Constructs an instance of the class UaUserTokenPolicy with values from another UaUserTokenPolicy object.

Parameters
otherthe 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.

Parameters
otherthe 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.

Parameters
extensionObjectthe 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.

Parameters
extensionObjectthe extension object containing the UserTokenPolicy

Member Function Documentation

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.

Parameters
pValue[in] Parameter to attach to.
void UaUserTokenPolicy::clear ( )

Clear the data of the UaUserTokenPolicy.

OpcUa_UserTokenPolicy * UaUserTokenPolicy::clone ( const OpcUa_UserTokenPolicy source)
static

Copy OpcUa_UserTokenPolicy data to a newly allocated OpcUa_UserTokenPolicy.

Parameters
sourceSource to clone.
Returns
pointer to a newly allocated OpcUa_UserTokenPolicy.
void UaUserTokenPolicy::cloneTo ( const OpcUa_UserTokenPolicy source,
OpcUa_UserTokenPolicy copy 
)
static

Copy OpcUa_UserTokenPolicy data to an existing OpcUa_UserTokenPolicy structure.

Parameters
sourcethe source of the clone operation.
copythe destination of the clone operation.
OpcUa_UserTokenPolicy * UaUserTokenPolicy::copy ( ) const

Copy UaUserTokenPolicy data to a newly allocated OpcUa_UserTokenPolicy.

Returns
pointer to a newly allocated OpcUa_UserTokenPolicy.
void UaUserTokenPolicy::copyTo ( OpcUa_UserTokenPolicy pDst) const

Copy UaUserTokenPolicy data to an existing OpcUa_UserTokenPolicy structure.

Parameters
pDstthe 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.

Parameters
pDst[out] Pointer to an OpcUa_UserTokenPolicy structure that receives the UserTokenPolicy data.
Returns
If the function succeeds, pDst is returned, otherwise 0 is returned.
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.

See also
operator==
Parameters
otherthe UaUserTokenPolicy to compare with.
Returns
true if not equal, false otherwise.
UaUserTokenPolicy & UaUserTokenPolicy::operator= ( const UaUserTokenPolicy other)

Assignment operator.

Parameters
otherthe UaUserTokenPolicy to assign.
Returns
reference to itself.
bool UaUserTokenPolicy::operator== ( const UaUserTokenPolicy other) const

Compare two UaUserTokenPolicy for equality.

Parameters
otherthe UaUserTokenPolicy to compare with.
Returns
true if equal, false if not.
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.


The documentation for this class was generated from the following files: