18.104.22.168.1. Event Handler Base Class¶
- class privacyidea.lib.eventhandler.base.BaseEventHandler[source]¶
An Eventhandler needs to return a list of actions, which it can handle.
It also returns a list of allowed action and conditions
It returns an identifier, which can be used in the eventhandlig definitions
- property actions¶
This method returns a list of available actions, that are provided by this event handler. :return: dictionary of actions.
- property allowed_positions¶
This returns the allowed positions of the event handler definition. This can be “post” or “pre” or both. :return: list of allowed positions
Check if all conditions are met and if the action should be executed. The the conditions are met, we return “True” :return: True
- property conditions¶
The UserNotification can filter for conditions like * type of logged in user and * successful or failed value.success
allowed types are str, multi, text, regexp
- description = 'This is the base class of an EventHandler with no functionality'¶
- do(action, options=None)[source]¶
This method executes the defined action in the given event.
options (dict) – Contains the flask parameters g and request and the handler_def configuration
- property events¶
This method returns a list allowed events, that this event handler can be bound to and which it can handle with the corresponding actions.
An eventhandler may return an asterisk [“*”] indicating, that it can be used in all events. :return: list of events
- identifier = 'BaseEventHandler'¶