PLCnext API Documentation  22.6.0.43
IAuthenticationProvider.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Um/Commons/SessionInfo.hpp"
9 
10 namespace Arp { namespace System { namespace Um { namespace Commons
11 {
12 
13 enum class UmAuthenticationResult;
14 
15 
17 {
18 
19 public: // construction/destruction
20  IAuthenticationProvider(void) = default;
23  IAuthenticationProvider& operator=(const IAuthenticationProvider& arg) = delete;
24  IAuthenticationProvider& operator=(IAuthenticationProvider&& arg) = delete;
25  virtual ~IAuthenticationProvider(void) = default;
26 
27 public: // abstract operations
28 
35  virtual UmAuthenticationResult AuthenticateUser(const String& username, const String& password, Commons::SessionInfo& sessionInfo) = 0;
36 
41  virtual void OnSessionClose(Commons::SessionInfo& session) = 0;
42 
43 };
44 
45 }}}} //end of namespace Arp::System::Um::Commons
Definition: IAuthenticationProvider.hpp:17
virtual UmAuthenticationResult AuthenticateUser(const String &username, const String &password, Commons::SessionInfo &sessionInfo)=0
This is called when the UserManager sets up a session.
virtual void OnSessionClose(Commons::SessionInfo &session)=0
This is called when the UserManager ends a session, in case the user actively logs out or a timeout a...
This class a SessionInfo instance with given role list
Definition: SessionInfo.hpp:19
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API