C++ Based OPC UA Client/Server SDK
1.6.1.391
|
Class for user context of a Session. More...
#include <sessionusercontext.h>
Inherits ReferenceCounter.
Inherited by SessionUserContextBase.
Public Member Functions | |
virtual bool | addRole (OpcUa_UInt32 roleId)=0 |
Add a role to the SessionUserContext. More... | |
virtual bool | hasRole (OpcUa_UInt32 roleId) const =0 |
Check if a specific role is assigned to this SessionUserContext. More... | |
virtual bool | removeRole (OpcUa_UInt32 roleId)=0 |
Remove a Role from the SessionUserContext. More... | |
virtual UaStatus | setIdentity (const UaIdentityMappingRuleType *pIdentity)=0 |
Set the identiy for the SessionUserContext (e.g. More... | |
virtual UaStatus | setIdentity (const UaUserIdentityToken *pUserIdentityToken)=0 |
Set the identiy for the SessionUserContext (e.g. More... | |
virtual UaIdentityMappingRuleType | getUserIdentity () const =0 |
Set the IdentityMappingRule assigned to the SessionUserContext. More... | |
virtual UaUInt32Array | getRoleIds () const =0 |
Get a list of RoleIds that are assigned to the SessionUserContext. More... | |
virtual bool | isRoot () const =0 |
Check if the SessionUserContext has root priviledges. More... | |
Public Member Functions inherited from ReferenceCounter | |
ReferenceCounter () | |
construction | |
virtual | ~ReferenceCounter () |
destruction | |
Class for user context of a Session.
OPC UA defines different information model elements like Objects, Variables, Method and Events and different services to access the information. This access can be restricted based on the role that tries to access the information. When a Session is activated the SessionUserContext gets a number of roles assigned and the SessionUserContext stores that information. Any component that needs to check access permissions can query the SessionUserContext to find out if a specific role is assigned to a SessionUserContext or not.
The AccessRestrictions and the RolePermissions are accessible on the UaNode via the NodeAccessInfo interface. The information from both interfaces SessionUserContext and NodeAccessInfo is used to determine if the requested operation like Read, Write or Browse can be executed.
|
pure virtual |
Add a role to the SessionUserContext.
roleId | Unique identifier for the role. This id is set when the role is registered. |
Implemented in SessionUserContextBase.
|
pure virtual |
Get a list of RoleIds that are assigned to the SessionUserContext.
Implemented in SessionUserContextBase.
|
pure virtual |
Set the IdentityMappingRule assigned to the SessionUserContext.
Implemented in SessionUserContextBase.
|
pure virtual |
Check if a specific role is assigned to this SessionUserContext.
roleId | Unique identifier for the role. This id is set when the role is registered. |
Implemented in SessionUserContextBase.
|
pure virtual |
Check if the SessionUserContext has root priviledges.
Implemented in SessionUserContextBase.
|
pure virtual |
Remove a Role from the SessionUserContext.
roleId | Unique identifier for the role. This id is set when the role is registered. |
Implemented in SessionUserContextBase.
|
pure virtual |
Set the identiy for the SessionUserContext (e.g.
Anonymous, UserName, Thumbprint)
pIdentity | The identity that was used to activate the Session. |
Implemented in SessionUserContextBase.
|
pure virtual |
Set the identiy for the SessionUserContext (e.g.
Anonymous, UserName, Thumbprint)
pIdentity | The identity that was used to activate the Session. |
Implemented in SessionUserContextBase.