imsweb / django-saml-sp

A Django application for running one or more SAML service providers (SP)
BSD 3-Clause "New" or "Revised" License
15 stars 10 forks source link

verification hooks #24

Open dcwatson opened 1 year ago

dcwatson commented 1 year ago

It would be nice to have some hooks into the verify workflow, to know when a user passed/failed verification. I think the basic idea would be to add a verify kwarg to IdP.authenticate, sp.utils.authenticate, and SAMLAuthenticationBackend.authenticate, then pass verify=True when authenticating a user for verification. Maybe the default implementation in SAMLAuthenticationBackend.authenticate could send a custom user_verified signal with a success parameter. Or maybe separate signals for pass/fail.