Implements a Doorman, that is, a component that will listen to authentication event and react accordingly.
More...
#include <DoormanInstance.hpp>
Implements a Doorman, that is, a component that will listen to authentication event and react accordingly.
The reaction is somehow scriptable through the configuration file.
Definition at line 64 of file DoormanInstance.hpp.
◆ DoormanInstance() [1/2]
DoormanInstance::DoormanInstance |
( |
DoormanModule & |
module, |
|
|
zmqpp::context & |
ctx, |
|
|
const std::string & |
name, |
|
|
const std::vector< std::string > & |
auth_contexts, |
|
|
const std::vector< DoormanAction > & |
actions |
|
) |
| |
Create a new doorman.
- Parameters
-
ctx | ZeroMQ context |
name | the name of this doorman |
auth_contexts | list of authentication context (by name) that we wish to watch |
actions | list of action to do when an event |
Definition at line 27 of file DoormanInstance.cpp.
◆ DoormanInstance() [2/2]
Leosac::Module::Doorman::DoormanInstance::DoormanInstance |
( |
const DoormanInstance & |
| ) |
|
|
delete |
◆ bus_sub()
zmqpp::socket & DoormanInstance::bus_sub |
( |
| ) |
|
◆ command_send_recv()
void DoormanInstance::command_send_recv |
( |
const std::string & |
target_name, |
|
|
zmqpp::message |
msg |
|
) |
| |
|
private |
Send a command to a target and wait for response.
- Parameters
-
target_name | name of target object |
msg | message containing command (and command parameter) to send |
Definition at line 105 of file DoormanInstance.cpp.
◆ doors()
const std::vector< std::shared_ptr< DoormanDoor > > & DoormanInstance::doors |
( |
| ) |
const |
◆ find_target()
◆ handle_bus_msg()
void DoormanInstance::handle_bus_msg |
( |
| ) |
|
◆ ignore_action()
Should we ignore this action.
There are multiple reason why we might wanna ignore an action:
- The expected status (
granted
/ denied
) does not match the received status.
- The door is in always_open (or alway_closed) mode.
Definition at line 134 of file DoormanInstance.cpp.
◆ operator=()
◆ actions_
std::vector<DoormanAction> Leosac::Module::Doorman::DoormanInstance::actions_ |
|
private |
◆ bus_sub_
zmqpp::socket Leosac::Module::Doorman::DoormanInstance::bus_sub_ |
|
private |
◆ doors_
std::vector<std::shared_ptr<DoormanDoor> > Leosac::Module::Doorman::DoormanInstance::doors_ |
|
private |
◆ name_
std::string Leosac::Module::Doorman::DoormanInstance::name_ |
|
private |
◆ targets_
std::map<std::string, zmqpp::socket> Leosac::Module::Doorman::DoormanInstance::targets_ |
|
private |
Socket (REP) connected to each target this doorman may have.
Definition at line 126 of file DoormanInstance.hpp.
The documentation for this class was generated from the following files: