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

This class is used for authorization of arbitrary operations. More...

#include <SecurityToken.hpp>

Public Types

using Value = uint32
 

Public Member Functions

 SecurityToken (Value value=GetNone())
 Constructs a SecurityToken instance. More...
 
 SecurityToken (const SecurityToken &arg)
 The default copy constructor.
 
 SecurityToken (SecurityToken &&arg) noexcept
 The default move constructor. More...
 
SecurityTokenoperator= (const SecurityToken &arg)
 THe default copy-assignment operator. More...
 
SecurityTokenoperator= (SecurityToken &&arg) noexcept
 The default move-assignment operator. More...
 
 ~SecurityToken (void)
 The default destructor.
 
bool HasValue (void) const
 Determines if this instance is initialized but not None. More...
 
Value GetValue (void) const
 Gets the value of this security token. More...
 
String ToString (void) const
 Converts this security token to a string. More...
 
Impl & GetImpl (void)
 For internal use only. More...
 
const Impl & GetImpl (void) const
 

Static Public Member Functions

static Value GetNone (void)
 Gets the None value meaning that the authentification is lacking. More...
 
static size_t GetSize (void)
 Gets the data size of the security token value. More...
 

Friends

ARP_EXPORT friend bool operator< (const SecurityToken &lhs, const SecurityToken &rhs)
 The less operator compares 2 SecurityTokens. More...
 
ARP_EXPORT friend bool operator== (const SecurityToken &lhs, const SecurityToken &rhs)
 The equality operator compares 2 SecurityTokens. More...
 

Detailed Description

This class is used for authorization of arbitrary operations.

The identifies a user session, which was created by the user manager.

Constructor & Destructor Documentation

◆ SecurityToken() [1/2]

Arp::Base::Commons::Security::SecurityToken::SecurityToken ( Value  value = GetNone())

Constructs a SecurityToken instance.

Parameters
valueSpecifies the initial security token value.

◆ SecurityToken() [2/2]

Arp::Base::Commons::Security::SecurityToken::SecurityToken ( SecurityToken &&  arg)
defaultnoexcept

The default move constructor.

Parameters
argThe argument to move.

Member Function Documentation

◆ GetImpl()

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

For internal use only.

Returns
The impl instance.

◆ GetNone()

SecurityToken::Value Arp::Base::Commons::Security::SecurityToken::GetNone ( void  )
static

Gets the None value meaning that the authentification is lacking.

Returns
The None value.

◆ GetSize()

size_t Arp::Base::Commons::Security::SecurityToken::GetSize ( void  )
static

Gets the data size of the security token value.

Returns
The data size of the security token value.

◆ GetValue()

SecurityToken::Value Arp::Base::Commons::Security::SecurityToken::GetValue ( void  ) const

Gets the value of this security token.

Returns
The value of this security token.

◆ HasValue()

bool Arp::Base::Commons::Security::SecurityToken::HasValue ( void  ) const

Determines if this instance is initialized but not None.

Returns

◆ operator=() [1/2]

SecurityToken & Arp::Base::Commons::Security::SecurityToken::operator= ( const SecurityToken arg)
default

THe default copy-assignment operator.

Parameters
argThe argument to copy.
Returns
This instance.

◆ operator=() [2/2]

SecurityToken & Arp::Base::Commons::Security::SecurityToken::operator= ( SecurityToken &&  arg)
defaultnoexcept

The default move-assignment operator.

Parameters
argThe argument to move.
Returns
This instance.

◆ ToString()

String Arp::System::Security::SecurityToken::ToString ( void  ) const

Converts this security token to a string.

Returns
The string reprsentation of this security token.

Friends And Related Function Documentation

◆ operator<

ARP_EXPORT friend bool operator< ( const SecurityToken lhs,
const SecurityToken rhs 
)
friend

The less operator compares 2 SecurityTokens.

Parameters
lhsThe left argument to compare to the right argument.
rhsThe right argument to compare to the left argument.
Returns
true if the left arguments is less than the right argument, otherwise false.

◆ operator==

ARP_EXPORT friend bool operator== ( const SecurityToken lhs,
const SecurityToken rhs 
)
friend

The equality operator compares 2 SecurityTokens.

Parameters
lhsThe left argument to compare to the right argument.
rhsThe right argument to compare to the left argument.
Returns
true if the arguments are equal, otherwise false.

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