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): """ 什么也不做呀😺 """