2023-07-24 03:52:25 +00:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
2021-09-09 06:00:50 +00:00
|
|
|
from rest_framework import serializers
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
'AuthSettingSerializer',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
class AuthSettingSerializer(serializers.Serializer):
|
2023-02-23 08:38:44 +00:00
|
|
|
PREFIX_TITLE = _('Authentication')
|
2022-11-04 06:22:38 +00:00
|
|
|
|
2023-08-15 08:58:41 +00:00
|
|
|
AUTH_LDAP = serializers.BooleanField(required=False, label=_('LDAP Auth'))
|
2021-09-09 06:00:50 +00:00
|
|
|
AUTH_CAS = serializers.BooleanField(required=False, label=_('CAS Auth'))
|
|
|
|
AUTH_OPENID = serializers.BooleanField(required=False, label=_('OPENID Auth'))
|
2023-08-15 08:58:41 +00:00
|
|
|
AUTH_SAML2 = serializers.BooleanField(default=False, label=_("SAML2 Auth"))
|
|
|
|
AUTH_OAUTH2 = serializers.BooleanField(default=False, label=_("OAuth2 Auth"))
|
2021-09-09 06:00:50 +00:00
|
|
|
AUTH_RADIUS = serializers.BooleanField(required=False, label=_('RADIUS Auth'))
|
|
|
|
AUTH_DINGTALK = serializers.BooleanField(default=False, label=_('DingTalk Auth'))
|
|
|
|
AUTH_FEISHU = serializers.BooleanField(default=False, label=_('FeiShu Auth'))
|
|
|
|
AUTH_WECOM = serializers.BooleanField(default=False, label=_('WeCom Auth'))
|
|
|
|
AUTH_SSO = serializers.BooleanField(default=False, label=_("SSO Auth"))
|
2023-09-14 06:26:17 +00:00
|
|
|
AUTH_PASSKEY = serializers.BooleanField(default=False, label=_("Passkey Auth"))
|
2021-09-09 06:00:50 +00:00
|
|
|
FORGOT_PASSWORD_URL = serializers.CharField(
|
2021-09-13 05:52:19 +00:00
|
|
|
required=False, allow_blank=True, max_length=1024,
|
|
|
|
label=_("Forgot password url")
|
2021-09-09 06:00:50 +00:00
|
|
|
)
|
|
|
|
LOGIN_REDIRECT_MSG_ENABLED = serializers.BooleanField(
|
|
|
|
required=False, label=_("Enable login redirect msg")
|
|
|
|
)
|