mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-04 17:01:09 +00:00
perf: 支持自定义短信认证
This commit is contained in:
committed by
Jiangjie.Bai
parent
5e7d474bb7
commit
20cc4ea320
@@ -39,7 +39,8 @@ class SMSTestingAPI(GenericAPIView):
|
||||
'alibaba': serializers.AlibabaSMSSettingSerializer,
|
||||
'tencent': serializers.TencentSMSSettingSerializer,
|
||||
'huawei': serializers.HuaweiSMSSettingSerializer,
|
||||
'cmpp2': serializers.CMPP2SMSSettingSerializer
|
||||
'cmpp2': serializers.CMPP2SMSSettingSerializer,
|
||||
'custom': serializers.CustomSMSSettingSerializer,
|
||||
}
|
||||
rbac_perms = {
|
||||
'POST': 'settings.change_sms'
|
||||
@@ -115,6 +116,12 @@ class SMSTestingAPI(GenericAPIView):
|
||||
}
|
||||
return init_params, send_sms_params
|
||||
|
||||
@staticmethod
|
||||
def get_custom_params(data):
|
||||
init_params = {}
|
||||
send_sms_params = {'template_param': OrderedDict(code='666666')}
|
||||
return init_params, send_sms_params
|
||||
|
||||
def get_params_by_backend(self, backend, data):
|
||||
"""
|
||||
返回两部分参数
|
||||
|
Reference in New Issue
Block a user