feat: 支持自定义认证 backend;统一其他认证方式的信号触发逻辑;通过配置文件控制

This commit is contained in:
Jiangjie.Bai
2022-08-24 18:41:47 +08:00
parent 89051b2c67
commit 8fc5c4cf9e
3 changed files with 9 additions and 4 deletions

View File

@@ -17,6 +17,8 @@ class CustomAuthBackend(JMSModelBackend):
return import_string(self.custom_auth_method_path)
def is_enabled(self):
if not settings.AUTH_CUSTOM:
return False
try:
self.load_authenticate_method()
except Exception as e: