Leosac
0.7.0
OpenSourceAccessControl
|
Module that reacts to authentication event.
The Doorman module is very important to Leosac's usability. It is the module responsible for reacting to messages sent by authentication / authorization modules.
If an access is granted (or denied) one (or more) actions can be taken by this module:
The main goal of this module is to trigger action on others components in the system. This is done by sending message to them.
Options | Options | Options | Options | Options | Description | Mandatory |
---|---|---|---|---|---|---|
instances | Multiples (unrelated) doorman instance are allowed | YES | ||||
—> | instance | Configuration information for 1 instance | YES | |||
—> | —> | name | Name of this doorman instance | YES | ||
—> | —> | auth_contexts | Message from multiple contexts can lead to the same action | YES | ||
—> | —> | —> | auth_context | Information for an Auth Context | YES | |
—> | —> | —> | —> | name | Name of the auth context we are using | YES |
—> | —> | actions | Configure the actions to take when something happens | YES | ||
—> | —> | —> | action | Configuration information for one action | YES | |
—> | —> | —> | —> | on | When should the action be taken (DENIED / GRANTED) | YES |
—> | —> | —> | —> | target | Name of the targeted object that will receive the action command | YES |
—> | —> | —> | —> | cmd | Description for the command that will be sent | YES |
doors | Optionally declares the doors | NO | ||||
—> | door | Declare one door | YES | |||
—> | —> | name | A name for the door | YES | ||
—> | —> | gpio | The GPIO to turn on/off based on the door's state | YES | ||
—> | —> | on | Some schedules for when the door is in "always open" mode | NO | ||
—> | —> | —> | schedules | See here to learn how to declare schedules | YES | |
—> | —> | off | Some schedules for when the door is in "always closed" mode | NO | ||
—> | —> | —> | schedules | See here to learn how to declare schedules | YES |
<cmd>
tag is quite simple. It looks like this: <fX>
where X
is growing for each frame you want.instances.instance.actions.action.target
is the name of an object that has been defined in the system. It could be the name of a GPIO you defined before ("my_super_gpio") or some reader object ("my_wiegand1"), etc.doors
is optional, and is only ever useful if you make use of the "always open" or "always close" feature.This is a very simple example that requires a component named "gpio_door" to open for 2.5 seconds when an successful authentication happens. If the authentication fails, it would ask the "led_failure" to turns on to 2.5s.
The following example file defines the following:
GREEN_LED
(with ON
and 1500
as parameters) command to the MY_WIEGAND_1
device. This will light the green led of the reader for 1.5second.ON
command (with 500
as parameter) to the wiegand_buzzer
GPIO, causing the device to beep for 0.5 second.