From 4688e46f97453be50671d24d11c7bcc528723dfc Mon Sep 17 00:00:00 2001 From: peijianbo Date: Mon, 14 Sep 2020 11:22:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(authentication):=E5=B0=86cas=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E9=80=9A=E8=BF=87=E7=9A=84=E7=99=BB=E5=BD=95=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E8=AE=B0=E5=BD=95=E5=88=B0=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/signals_handlers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/authentication/signals_handlers.py b/apps/authentication/signals_handlers.py index dc6bf5e27..4c49f5d55 100644 --- a/apps/authentication/signals_handlers.py +++ b/apps/authentication/signals_handlers.py @@ -4,6 +4,7 @@ from django.conf import settings from django.contrib.auth import user_logged_in from django.core.cache import cache from django.dispatch import receiver +from django_cas_ng.signals import cas_user_authenticated from jms_oidc_rp.signals import openid_user_login_failed, openid_user_login_success @@ -29,3 +30,8 @@ def on_oidc_user_login_success(sender, request, user, **kwargs): @receiver(openid_user_login_failed) def on_oidc_user_login_failed(sender, username, request, reason, **kwargs): post_auth_failed.send(sender, username=username, request=request, reason=reason) + + +@receiver(cas_user_authenticated) +def on_cas_user_login_success(sender, request, user, **kwargs): + post_auth_success.send(sender, user=user, request=request) \ No newline at end of file