PLCnext API Documentation 25.0.2.69
Public Member Functions | Static Public Member Functions | List of all members
Arp::Base::Commons::Security::SecurityContext Class Reference

This class is an adapter class of the SecurityToken to provide security info into any operations which are called after an instance of this class was instantiated. This avoids to extend subsequent called operations by a new parameter of type SecurityToken. More...

#include <SecurityContext.hpp>

Public Member Functions

 SecurityContext (Impl &impl)
 Constructs a SecurityContext instance. More...
 
 SecurityContext (const SecurityContext &arg)=delete
 
 SecurityContext (SecurityContext &&arg) noexcept=delete
 
SecurityContextoperator= (const SecurityContext &arg)=delete
 
SecurityContextoperator= (SecurityContext &&arg) noexcept=delete
 
 ~SecurityContext (void)
 The default destructor. More...
 
const SecurityTokenGetSecurityToken (void) const
 Gets the security token. More...
 
Impl & GetImpl (void)
 For internal use only. More...
 
const Impl & GetImpl (void) const
 

Static Public Member Functions

static bool HasCurrent (void)
 This static operation checks if a SecurityContext is available. More...
 
static const SecurityContextGetCurrent (void)
 This static operation gets the current SecurityContext. More...
 

Detailed Description

This class is an adapter class of the SecurityToken to provide security info into any operations which are called after an instance of this class was instantiated. This avoids to extend subsequent called operations by a new parameter of type SecurityToken.

This class implements the stack based thread-singleton pattern, enabling subsequent called operations to retrieve suecurity infos.

Constructor & Destructor Documentation

◆ SecurityContext()

Arp::Base::Commons::Security::SecurityContext::SecurityContext ( Impl &  impl)

Constructs a SecurityContext instance.

Parameters
implThe Impl instance.

◆ ~SecurityContext()

ARP_EXPORT Arp::System::Security::SecurityContext::~SecurityContext ( void  )
default

The default destructor.

Destructs this instance and frees all resources.

Member Function Documentation

◆ GetCurrent()

ARP_EXPORT const SecurityContext & Arp::System::Security::SecurityContext::GetCurrent ( void  )
static

This static operation gets the current SecurityContext.

Returns
The current SecurityContext.
Exceptions
InvalidOperationExceptionIf the SecurityContext is not available.

◆ GetImpl()

const SecurityContext::Impl & Arp::Base::Commons::Security::SecurityContext::GetImpl ( void  )

For internal use only.

Returns
The impl instance.

◆ GetSecurityToken()

const SecurityToken & Arp::Base::Commons::Security::SecurityContext::GetSecurityToken ( void  ) const

Gets the security token.

Returns
The security token.

◆ HasCurrent()

ARP_EXPORT bool Arp::System::Security::SecurityContext::HasCurrent ( void  )
static

This static operation checks if a SecurityContext is available.

Returns
true if a SecurityContext is available, otherwise false.

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