14.2.1.8.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

actions

This method returns a list of available actions, that are provided by this event handler. :return: dictionary of actions.

check_condition(options)[source]

Check if all conditions are met and if the action should be executed. The the conditions are met, we return “True” :return: True

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

Returns:dict
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.

Parameters:
  • action
  • options (dict) – Contains the flask parameters g and request and the handler_def configuration
Returns:

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'