mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
684 B
16 lines
684 B
from django.utils.translation import ugettext_lazy as _
|
|
from rest_framework import serializers
|
|
|
|
from common.serializers.fields import EncryptedField
|
|
|
|
__all__ = ['DingTalkSettingSerializer']
|
|
|
|
|
|
class DingTalkSettingSerializer(serializers.Serializer):
|
|
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('DingTalk'))
|
|
|
|
DINGTALK_AGENTID = serializers.CharField(max_length=256, required=True, label='AgentId')
|
|
DINGTALK_APPKEY = serializers.CharField(max_length=256, required=True, label='AppKey')
|
|
DINGTALK_APPSECRET = EncryptedField(max_length=256, required=False, label='AppSecret')
|
|
AUTH_DINGTALK = serializers.BooleanField(default=False, label=_('Enable DingTalk Auth'))
|