Leosac  0.8.0
Open Source Access Control
Leosac::Auth::AuthSourceBuilder Class Reference

This class is some kind of factory to create IAuthenticationSource object from a zmqpp::message sent by a AuthSource module (eg Wiegand). More...

#include <AuthSourceBuilder.hpp>

Public Member Functions

 AuthSourceBuilder ()=default
 
virtual ~AuthSourceBuilder ()=default
 
 AuthSourceBuilder (const AuthSourceBuilder &)=delete
 
 AuthSourceBuilder (AuthSourceBuilder &&)=delete
 
AuthSourceBuilderoperator= (const AuthSourceBuilder &)=delete
 
AuthSourceBuilderoperator= (AuthSourceBuilder &&)=delete
 
virtual Cred::ICredentialPtr create (zmqpp::message *msg)
 Create a Credential object from a message. More...
 
bool extract_source_name (const std::string &input, std::string *output) const
 Extract the source name from the frame. More...
 

Protected Member Functions

Cred::ICredentialPtr create_simple_wiegand (const std::string &name, zmqpp::message *msg)
 Create an auth source from SIMPLE_WIEGAND data type. More...
 
Cred::ICredentialPtr create_pincode (const std::string &name, zmqpp::message *msg)
 Create an auth source from WIEGAND_PIN data type. More...
 
Cred::ICredentialPtr create_wiegand_card_pin (const std::string &name, zmqpp::message *msg)
 Create an auth source from a WiegandCard and PIN Code. More...
 
Cred::ICredentialPtr create_simple_csn (const std::string &name, zmqpp::message *msg)
 

Detailed Description

This class is some kind of factory to create IAuthenticationSource object from a zmqpp::message sent by a AuthSource module (eg Wiegand).

The AuthenticationSource will not contain all data. It still needs to be mapped to a user/access profile.

Definition at line 37 of file AuthSourceBuilder.hpp.

Constructor & Destructor Documentation

◆ AuthSourceBuilder() [1/3]

Leosac::Auth::AuthSourceBuilder::AuthSourceBuilder ( )
explicitdefault

◆ ~AuthSourceBuilder()

virtual Leosac::Auth::AuthSourceBuilder::~AuthSourceBuilder ( )
virtualdefault

◆ AuthSourceBuilder() [2/3]

Leosac::Auth::AuthSourceBuilder::AuthSourceBuilder ( const AuthSourceBuilder )
delete

◆ AuthSourceBuilder() [3/3]

Leosac::Auth::AuthSourceBuilder::AuthSourceBuilder ( AuthSourceBuilder &&  )
delete

Member Function Documentation

◆ create()

Cred::ICredentialPtr Leosac::Auth::AuthSourceBuilder::create ( zmqpp::message *  msg)
virtual

Create a Credential object from a message.

Parameters
msgmessage from auth source module, CANNOT BE NULL.

Definition at line 52 of file AuthSourceBuilder.cpp.

◆ create_pincode()

Cred::ICredentialPtr Leosac::Auth::AuthSourceBuilder::create_pincode ( const std::string &  name,
zmqpp::message *  msg 
)
protected

Create an auth source from WIEGAND_PIN data type.

Definition at line 109 of file AuthSourceBuilder.cpp.

◆ create_simple_csn()

Cred::ICredentialPtr Leosac::Auth::AuthSourceBuilder::create_simple_csn ( const std::string &  name,
zmqpp::message *  msg 
)
protected

Definition at line 33 of file AuthSourceBuilder.cpp.

◆ create_simple_wiegand()

Cred::ICredentialPtr Leosac::Auth::AuthSourceBuilder::create_simple_wiegand ( const std::string &  name,
zmqpp::message *  msg 
)
protected

Create an auth source from SIMPLE_WIEGAND data type.

Parameters
msgthe message first frame shall be wiegand data (ie previous should be pop'd).

Definition at line 92 of file AuthSourceBuilder.cpp.

◆ create_wiegand_card_pin()

Cred::ICredentialPtr Leosac::Auth::AuthSourceBuilder::create_wiegand_card_pin ( const std::string &  name,
zmqpp::message *  msg 
)
protected

Create an auth source from a WiegandCard and PIN Code.

Definition at line 126 of file AuthSourceBuilder.cpp.

◆ extract_source_name()

bool Leosac::Auth::AuthSourceBuilder::extract_source_name ( const std::string &  input,
std::string *  output 
) const

Extract the source name from the frame.

Parameters
outputshall not be null.
Returns
true if it succeed, false otherwise.
See also
Message Passing Specifications

Definition at line 79 of file AuthSourceBuilder.cpp.

◆ operator=() [1/2]

AuthSourceBuilder& Leosac::Auth::AuthSourceBuilder::operator= ( AuthSourceBuilder &&  )
delete

◆ operator=() [2/2]

AuthSourceBuilder& Leosac::Auth::AuthSourceBuilder::operator= ( const AuthSourceBuilder )
delete

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