2022-02-25 11:23:59 +00:00
|
|
|
from django.conf import settings
|
|
|
|
|
2022-03-16 09:03:16 +00:00
|
|
|
from .base import JMSModelBackend
|
2022-02-25 11:23:59 +00:00
|
|
|
|
|
|
|
|
2022-03-16 09:03:16 +00:00
|
|
|
class SSOAuthentication(JMSModelBackend):
|
2022-02-25 11:23:59 +00:00
|
|
|
"""
|
|
|
|
什么也不做呀😺
|
|
|
|
"""
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_SSO
|
|
|
|
|
|
|
|
def authenticate(self, request, sso_token=None, **kwargs):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2022-03-16 09:03:16 +00:00
|
|
|
class WeComAuthentication(JMSModelBackend):
|
2022-02-25 11:23:59 +00:00
|
|
|
"""
|
|
|
|
什么也不做呀😺
|
|
|
|
"""
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_WECOM
|
|
|
|
|
|
|
|
def authenticate(self, request, **kwargs):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2022-03-16 09:03:16 +00:00
|
|
|
class DingTalkAuthentication(JMSModelBackend):
|
2022-02-25 11:23:59 +00:00
|
|
|
"""
|
|
|
|
什么也不做呀😺
|
|
|
|
"""
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_DINGTALK
|
|
|
|
|
|
|
|
def authenticate(self, request, **kwargs):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2022-03-16 09:03:16 +00:00
|
|
|
class FeiShuAuthentication(JMSModelBackend):
|
2022-02-25 11:23:59 +00:00
|
|
|
"""
|
|
|
|
什么也不做呀😺
|
|
|
|
"""
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_FEISHU
|
|
|
|
|
|
|
|
def authenticate(self, request, **kwargs):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2022-03-16 09:03:16 +00:00
|
|
|
class AuthorizationTokenAuthentication(JMSModelBackend):
|
2022-02-25 11:23:59 +00:00
|
|
|
"""
|
|
|
|
什么也不做呀😺
|
|
|
|
"""
|
|
|
|
def authenticate(self, request, **kwargs):
|
|
|
|
pass
|