PLCnext API Documentation
20.3.1.28622
Arp
System
Security
SecurityContext.hpp
1
//
3
// Copyright PHOENIX CONTACT Electronics GmbH
4
//
6
#pragma once
7
#include "
Arp/System/Core/Arp.h
"
8
#include "Arp/System/Security/SecurityToken.hpp"
9
#include "Arp/System/Commons/Exceptions/InvalidOperationException.hpp"
10
11
using namespace
Arp::System::Commons
;
12
13
namespace
Arp
{
namespace
System
{
namespace
Security
14
{
15
16
class
SecurityContext
17
{
18
public
:
// typedefs
19
20
public
:
// construction/destruction
22
ARP_CXX_SYMBOL_EXPORT
SecurityContext
(
const
SecurityToken
& securityToken);
24
SecurityContext(
const
SecurityContext& arg) =
delete
;
26
SecurityContext& operator=(
const
SecurityContext& arg) =
delete
;
28
ARP_CXX_SYMBOL_EXPORT ~SecurityContext(
void
);
29
30
public
:
// static operations
31
ARP_CXX_SYMBOL_EXPORT
static
bool
HasCurrent(
void
);
32
ARP_CXX_SYMBOL_EXPORT
static
const
SecurityContext& GetCurrent(
void
);
33
34
public
:
// setter/getter operations
35
const
SecurityToken
& GetSecurityToken(
void
)
const
;
36
37
private
:
// fields
38
const
SecurityToken
& securityToken;
39
40
private
:
// static fields
41
static
thread_local
const
SecurityContext* pCurrent;
42
};
43
45
// inline methods of class SecurityContext
46
47
inline
const
SecurityToken
& SecurityContext::GetSecurityToken()
const
48
{
49
return
this->securityToken;
50
}
51
52
}}}
// end of namespace Arp::System::Security
Arp::System::Security::SecurityToken
Definition:
SecurityToken.hpp:11
Arp.h
Arp
Root namespace for the PLCnext API
Arp::System::Security::SecurityContext
Definition:
SecurityContext.hpp:16
Arp::System::Acf::ComponentCategory::System
System components used by the System, Device, Plc or Io domains.
Arp::System::Commons
Namespace for basic functions of the framework
Generated on Wed Apr 22 2020 14:50:40 for PLCnext API Documentation by
1.8.13