jumpserver/apps/settings/serializers/auth/sso.py

23 lines
699 B
Python
Raw Normal View History

2023-07-24 03:52:25 +00:00
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
__all__ = [
'SSOSettingSerializer',
]
class SSOSettingSerializer(serializers.Serializer):
2023-08-15 08:58:41 +00:00
"""
不对外开放了只能通过配置文件修改比较这个稍微有点危险
"""
PREFIX_TITLE = _('SSO')
AUTH_SSO = serializers.BooleanField(
required=False, label=_('Enable SSO auth'),
help_text=_("Other service can using SSO token login to JumpServer without password")
)
AUTH_SSO_AUTHKEY_TTL = serializers.IntegerField(
2021-09-14 11:30:03 +00:00
required=False, label=_('SSO auth key TTL'), help_text=_("Unit: second"),
min_value=60, max_value=60 * 30
)