mirror of https://github.com/jumpserver/jumpserver
fix: 修复sso用户登录失败的问题
parent
572c5b6925
commit
efb26132f6
|
@ -83,6 +83,6 @@ class SSOViewSet(AuthMixin, JMSGenericViewSet):
|
||||||
return HttpResponseRedirect(next_url)
|
return HttpResponseRedirect(next_url)
|
||||||
|
|
||||||
user = token.user
|
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)
|
self.send_auth_signal(success=True, user=user)
|
||||||
return HttpResponseRedirect(next_url)
|
return HttpResponseRedirect(next_url)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
from django.conf import settings
|
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
|
pass
|
||||||
|
|
||||||
|
|
||||||
class WeComAuthentication(JMSBaseAuthBackend):
|
class WeComAuthentication(JMSModelBackend):
|
||||||
"""
|
"""
|
||||||
什么也不做呀😺
|
什么也不做呀😺
|
||||||
"""
|
"""
|
||||||
|
@ -29,7 +29,7 @@ class WeComAuthentication(JMSBaseAuthBackend):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class DingTalkAuthentication(JMSBaseAuthBackend):
|
class DingTalkAuthentication(JMSModelBackend):
|
||||||
"""
|
"""
|
||||||
什么也不做呀😺
|
什么也不做呀😺
|
||||||
"""
|
"""
|
||||||
|
@ -42,7 +42,7 @@ class DingTalkAuthentication(JMSBaseAuthBackend):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class FeiShuAuthentication(JMSBaseAuthBackend):
|
class FeiShuAuthentication(JMSModelBackend):
|
||||||
"""
|
"""
|
||||||
什么也不做呀😺
|
什么也不做呀😺
|
||||||
"""
|
"""
|
||||||
|
@ -55,7 +55,7 @@ class FeiShuAuthentication(JMSBaseAuthBackend):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class AuthorizationTokenAuthentication(JMSBaseAuthBackend):
|
class AuthorizationTokenAuthentication(JMSModelBackend):
|
||||||
"""
|
"""
|
||||||
什么也不做呀😺
|
什么也不做呀😺
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue