fix: 修复sso用户登录失败的问题

pull/7880/head
Jiangjie.Bai 2022-03-16 17:03:16 +08:00 committed by Jiangjie.Bai
parent 572c5b6925
commit efb26132f6
2 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

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