linotp.provider.notification module¶
provider notification handling
- exception linotp.provider.notification.NotificationException¶
Bases:
Exception
- linotp.provider.notification.notify_user(user, action, info, required=False)¶
notify user via email, sms or other method (http/whatsapp…)
- Parameters
user – the user who should be notified
action – action is currently the notification action like enrollment, setPin, which are defined in the notification policies
info – generic dict which is action specific
required – if True an exception is raised if no notification could be send eg if no provider is defined or could be found
- Returns
boolean - true if notification is enabled
- linotp.provider.notification.notify_user_by_email(provider_name, user, action, info)¶
notify user via email
- Parameters
provider_name – the name of the provider that should be used
user – the user who should be notified
action – action is currently the notification action like enrollment, setPin, which are defined in the notification policies
info – generic dict which is action specific