C++ Based OPC UA Client/Server SDK  1.6.3.406
SessionUserContextBase Class Reference

Class for user context of a Session. More...

#include <sessionusercontextbase.h>

Inherits SessionUserContext.

Public Member Functions

 SessionUserContextBase ()
 Creates a SessionUserContext object with the provided user ID.
 
virtual bool addRole (OpcUa_UInt32 roleId)
 Add a role to the SessionUserContext. More...
 
virtual bool hasRole (OpcUa_UInt32 roleId) const
 Check if a specific role is assigned to this SessionUserContext. More...
 
virtual bool removeRole (OpcUa_UInt32 roleId)
 Remove a Role from the SessionUserContext. More...
 
virtual UaStatus setIdentity (const UaIdentityMappingRuleType *pIdentity)
 Set the identiy for the SessionUserContext (e.g. More...
 
virtual UaStatus setIdentity (const UaUserIdentityToken *pUserIdentityToken)
 Set the identiy for the SessionUserContext (e.g. More...
 
virtual UaIdentityMappingRuleType getUserIdentity () const
 Set the IdentityMappingRule assigned to the SessionUserContext. More...
 
virtual UaUInt32Array getRoleIds () const
 Get a list of RoleIds that are assigned to the SessionUserContext. More...
 
virtual bool isRoot () const
 Check if the SessionUserContext has root priviledges. More...
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter ()
 construction
 
virtual ~ReferenceCounter ()
 destruction
 

Detailed Description

Class for user context of a Session.

Toolkit implementation of the SessionUserContext interface that supports a list of RoleIds

Member Function Documentation

bool SessionUserContextBase::addRole ( OpcUa_UInt32  roleId)
virtual

Add a role to the SessionUserContext.

Parameters
roleIdUnique identifier for the role. This id is set when the role is registered.
Returns
True if the RoleId was successfully added. False the SessionUserContext already had this role before.

Implements SessionUserContext.

UaUInt32Array SessionUserContextBase::getRoleIds ( ) const
virtual

Get a list of RoleIds that are assigned to the SessionUserContext.

Returns
List of RoleIds.

Implements SessionUserContext.

UaIdentityMappingRuleType SessionUserContextBase::getUserIdentity ( ) const
virtual

Set the IdentityMappingRule assigned to the SessionUserContext.

Returns
The UaIdentityMappingRule set for the SessionUserContext.

Implements SessionUserContext.

bool SessionUserContextBase::hasRole ( OpcUa_UInt32  roleId) const
virtual

Check if a specific role is assigned to this SessionUserContext.

Parameters
roleIdUnique identifier for the role. This id is set when the role is registered.
Returns
True if the RoleId is assigned to the SessionUserContext. False otherwise.

Implements SessionUserContext.

bool SessionUserContextBase::isRoot ( ) const
virtual

Check if the SessionUserContext has root priviledges.

Returns
True if the SessionUserContext has root priviledges. False otherwise.

Implements SessionUserContext.

bool SessionUserContextBase::removeRole ( OpcUa_UInt32  roleId)
virtual

Remove a Role from the SessionUserContext.

Parameters
roleIdUnique identifier for the role. This id is set when the role is registered.
Returns
True if the RoleId was removed from the SessionUserContext. False otherwise.

Implements SessionUserContext.

UaStatus SessionUserContextBase::setIdentity ( const UaIdentityMappingRuleType pIdentity)
virtual

Set the identiy for the SessionUserContext (e.g.

Anonymous, UserName, Thumbprint)

Parameters
pIdentityThe identity that was used to activate the Session.
Returns
Good.

Implements SessionUserContext.

UaStatus SessionUserContextBase::setIdentity ( const UaUserIdentityToken pUserIdentityToken)
virtual

Set the identiy for the SessionUserContext (e.g.

Anonymous, UserName, Thumbprint)

Parameters
pIdentityThe identity that was used to activate the Session.
Returns
Good if converting the UserIdentityToken into a IdentityMappingRule succeeded. Bad otherwise.

Implements SessionUserContext.


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