From ce5fcb3d30981e2123f7df0afd6261471058f3fe Mon Sep 17 00:00:00 2001 From: Robin Champenois Date: Sun, 17 Jan 2021 22:20:13 +0100 Subject: [PATCH] =?UTF-8?q?Signaux=20de=20cr=C3=A9ation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- authens/backends.py | 1 + authens/signals.py | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 authens/signals.py diff --git a/authens/backends.py b/authens/backends.py index fb164a7..38da33c 100644 --- a/authens/backends.py +++ b/authens/backends.py @@ -107,6 +107,7 @@ class ENSCASBackend: CASAccount.objects.create( user=user, entrance_year=entrance_year, cas_login=cas_login ) + post_cas_create.send(user, cas_login=cas_login, attributes=attributes) return user # Django boilerplate. diff --git a/authens/signals.py b/authens/signals.py new file mode 100644 index 0000000..4c50aa2 --- /dev/null +++ b/authens/signals.py @@ -0,0 +1,3 @@ +import django.dispatch + +post_cas_create = django.dispatch.Signal()