2022-02-25 11:23:59 +00:00
|
|
|
from django.conf import settings
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
from .base import JMSBaseAuthBackend
|
2022-02-25 11:23:59 +00:00
|
|
|
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
class SSOAuthentication(JMSBaseAuthBackend):
|
2022-02-25 11:23:59 +00:00
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_SSO
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
def authenticate(self):
|
2022-02-25 11:23:59 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
class WeComAuthentication(JMSBaseAuthBackend):
|
2022-02-25 11:23:59 +00:00
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_WECOM
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
def authenticate(self):
|
2022-02-25 11:23:59 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
class DingTalkAuthentication(JMSBaseAuthBackend):
|
2022-02-25 11:23:59 +00:00
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_DINGTALK
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
def authenticate(self):
|
2022-02-25 11:23:59 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
class FeiShuAuthentication(JMSBaseAuthBackend):
|
2022-02-25 11:23:59 +00:00
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_FEISHU
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
def authenticate(self):
|
2022-02-25 11:23:59 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2024-03-22 10:05:43 +00:00
|
|
|
class LarkAuthentication(FeiShuAuthentication):
|
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_LARK
|
|
|
|
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
class SlackAuthentication(JMSBaseAuthBackend):
|
2023-11-29 09:45:44 +00:00
|
|
|
@staticmethod
|
|
|
|
def is_enabled():
|
|
|
|
return settings.AUTH_SLACK
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
def authenticate(self):
|
2023-11-29 09:45:44 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2024-12-09 06:13:44 +00:00
|
|
|
class AuthorizationTokenAuthentication(JMSBaseAuthBackend):
|
|
|
|
def authenticate(self):
|
2022-02-25 11:23:59 +00:00
|
|
|
pass
|