PLCnext API Documentation  21.9.0.40
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Arp::System::Um::Services::IPasswordAuthenticationService Class Referenceabstract

Create and close sessions at the UserManager. More...

#include <IPasswordAuthenticationService.hpp>

Inheritance diagram for Arp::System::Um::Services::IPasswordAuthenticationService:
Inheritance graph

Public Types

using Ptr = std::shared_ptr< IPasswordAuthenticationService >
 
- Public Types inherited from Arp::System::Rsc::Services::IRscService
typedef std::shared_ptr< IRscServicePtr
 

Public Member Functions

 IPasswordAuthenticationService (void)=default
 Constructs an IPasswordAuthenticationService instance. More...
 
virtual AuthenticationError CreateSession (const RscString< 64 > &userName, const SecureString< 128 > &password, const ChannelInformation &channelInformation, SecurityToken &securityToken, uint32 &penaltyDelayMillis, uint32 &initialTimeOutMillis)=0
 Creates a new Session against the UserManager. More...
 
virtual void ProlongSession (SecurityToken securityToken, uint32 &newTimeOutMillis)=0
 Prolongs the timeout of the current session (as referenced by the

securityToken

within an extended Remoting header). More...

 
virtual void CloseSession (SecurityToken securityToken)=0
 Closed the current session (as referenced by the

securityToken

within an extended Remoting header). More...

 
- Public Member Functions inherited from Arp::System::Rsc::Services::IRscService
 IRscService (void)=default
 Constructs an IRscService instance. More...
 
virtual ~IRscService (void)=default
 Destructs this instance and frees all resouces. More...
 

Static Public Member Functions

static IRscServiceProxyFactory & GetProxyFactory (void)
 
- Static Public Member Functions inherited from Arp::System::Rsc::Services::IRscService
static IRscServiceProxyFactory & GetProxyFactory (void)
 Returns a reference to service proxy factory to create a proxy instance of the service More...
 

Detailed Description

Create and close sessions at the UserManager.

This service is intended to be used by gateways which authenticate users before they are allowed to access the insides of the PLCnext technology driven device. Examples for gateways are the Remoting Service Call gateway (RSC-gateway) when it authenticates users at the other end of TCP-based Remoting channels and the built-in OPC UA server when it authenticates users during the establishment of a session with the client.

See also
!:IAuthorizationService

Constructor & Destructor Documentation

◆ IPasswordAuthenticationService()

Arp::System::Um::Services::IPasswordAuthenticationService::IPasswordAuthenticationService ( void  )
default

Constructs an IPasswordAuthenticationService instance.

Member Function Documentation

◆ CloseSession()

virtual void Arp::System::Um::Services::IPasswordAuthenticationService::CloseSession ( SecurityToken  securityToken)
pure virtual

Closed the current session (as referenced by the

securityToken

within an extended Remoting header).

◆ CreateSession()

virtual AuthenticationError Arp::System::Um::Services::IPasswordAuthenticationService::CreateSession ( const RscString< 64 > &  userName,
const SecureString< 128 > &  password,
const ChannelInformation channelInformation,
SecurityToken securityToken,
uint32 penaltyDelayMillis,
uint32 initialTimeOutMillis 
)
pure virtual

Creates a new Session against the UserManager.

This method allows other components such as the RSC-gateway to create sessions under a username and password. It returns a

securityToken

which is to be used within extended Remoting headers in subsequent remoting calls, to authorize these calls or to check for authorization with the !:IAuthorizationService. For authentication the operation "arp.static.device/CreateSession" needs to be granted for the specific protocol as described by channelInformation .

Parameters
userNameusername to use for the authentication for the new session
passwordpassword corresponding to the username
channelInformationdescribes properties of the channel which are used to augment the session context within the UserManager
securityTokenIf and only if this method returns with Arp.System.Um.Services.AuthenticationError.None then value of this parameter is valid. It is a value which shall be used within extended Remoting headers in subsequent Remoting calls.
penaltyDelayMillisIf and only if this method returns with Arp.System.Um.Services.AuthenticationError.PenaltyDelayActive then the value of this parameter is valid. It describes a delay in milliseconds which must pass before the next authentication attempt due to this or a former authentication failure. The penalty is enforced by the UserManager. The penalty delay may be enforced per user or global - depending on the security policy which is implemented by the UserManager.
initialTimeOutMillisEach session is created with a timeout. After exeeding the timeout the session will be closed automatically the session can be prolonged with a call to !:ProlongSession(UInt32, out uint). The initial timeout set for this session is returned by this out parameter expressed in milliseconds.
Returns
AuthenticationError::None if the Session was successfully created Error code from AuthenticationError if unsuccessful

◆ ProlongSession()

virtual void Arp::System::Um::Services::IPasswordAuthenticationService::ProlongSession ( SecurityToken  securityToken,
uint32 newTimeOutMillis 
)
pure virtual

Prolongs the timeout of the current session (as referenced by the

securityToken

within an extended Remoting header).

Parameters
securityTokenthe security token of the session which is to be prolonged
newTimeOutMillisThe new timeout set for this session is returned by this out parameter expressed in milliseconds.

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