From efb26132f6b3ba9647a5aca4751893204983a887 Mon Sep 17 00:00:00 2001 From: "Jiangjie.Bai" Date: Wed, 16 Mar 2022 17:03:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dsso=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/api/sso.py | 2 +- apps/authentication/backends/sso.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/authentication/api/sso.py b/apps/authentication/api/sso.py index 11f76d633..88d9707db 100644 --- a/apps/authentication/api/sso.py +++ b/apps/authentication/api/sso.py @@ -83,6 +83,6 @@ class SSOViewSet(AuthMixin, JMSGenericViewSet): return HttpResponseRedirect(next_url) user = token.user - login(self.request, user, 'authentication.backends.api.SSOAuthentication') + login(self.request, user, settings.AUTH_BACKEND_SSO) self.send_auth_signal(success=True, user=user) return HttpResponseRedirect(next_url) diff --git a/apps/authentication/backends/sso.py b/apps/authentication/backends/sso.py index 86d8f76e1..7bee484dc 100644 --- a/apps/authentication/backends/sso.py +++ b/apps/authentication/backends/sso.py @@ -1,9 +1,9 @@ from django.conf import settings -from .base import JMSBaseAuthBackend +from .base import JMSModelBackend -class SSOAuthentication(JMSBaseAuthBackend): +class SSOAuthentication(JMSModelBackend): """ 什么也不做呀😺 """ @@ -16,7 +16,7 @@ class SSOAuthentication(JMSBaseAuthBackend): pass -class WeComAuthentication(JMSBaseAuthBackend): +class WeComAuthentication(JMSModelBackend): """ 什么也不做呀😺 """ @@ -29,7 +29,7 @@ class WeComAuthentication(JMSBaseAuthBackend): pass -class DingTalkAuthentication(JMSBaseAuthBackend): +class DingTalkAuthentication(JMSModelBackend): """ 什么也不做呀😺 """ @@ -42,7 +42,7 @@ class DingTalkAuthentication(JMSBaseAuthBackend): pass -class FeiShuAuthentication(JMSBaseAuthBackend): +class FeiShuAuthentication(JMSModelBackend): """ 什么也不做呀😺 """ @@ -55,7 +55,7 @@ class FeiShuAuthentication(JMSBaseAuthBackend): pass -class AuthorizationTokenAuthentication(JMSBaseAuthBackend): +class AuthorizationTokenAuthentication(JMSModelBackend): """ 什么也不做呀😺 """