-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathappsettings.json
More file actions
116 lines (91 loc) · 4.43 KB
/
Copy pathappsettings.json
File metadata and controls
116 lines (91 loc) · 4.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
"Redis": { //Redis配置
"Configuration": "127.0.0.1:6379"
},
"EmaySetting": { //亿美短信配置
"Host": "http://shmtn.b2m.cn:80",
"AppId": "111",
"SecretKey": "2222"
},
"AlibabaConfig": { //阿里短信账号配置
"AccessKeyId": "",
"AccessKeySecret": "",
"Endpoint": "dysmsapi.aliyuncs.com"
},
"AlibabaSmsParameterSetting": { //阿里短信请求参数配置
"DefaultSignName": "阿里云短信测试专用",
"Parameters": {
"ForgetAndResetPassword": {
"SignName": null,
"TemplateCode": "SMS_207948308"
}
}
},
"EMailMimeMessageSetting": { //邮件Mime Message配置
"DefaultTextFormat": "Plain",
"Parameters": {
"ForgetAndResetPassword": {
"Subject": "找回密码",
"TextFormat": null
}
}
},
"EMailSetting": { //邮箱配置
"Host": "smtp.mxhichina.com",
"Port": 465,
"UseSsl": true,
"UserName": "测试邮箱",
"UserAddress": "阿里邮箱地址",
"Password": "邮箱密码"
},
"ComplexSetting": { //所有字典类属性Key值的组成方式均为 ICodeSender.Key + 下划线 + 业务标志bizFlag
"EffectiveTimeDisplayed": "Auto", //设置为Auto会导致ContentFormatters有效期部分的展示发生变化
"ContentFormatters": { //内容模板
"NONE_ForgetAndResetPassword": "",
"Console_ForgetAndResetPassword": "{0}的{1}(找回密码)验证码为{2},有效期为{3}秒",
"EMAIL_ForgetAndResetPassword": "您的找回密码验证码为{2},有效期为{3}分钟。",
"SMS_ForgetAndResetPassword": "【亿美软通】找回密码验证码为{2},有效期为{3}分钟,请尽快使用。",
"ALIBABASMS_ForgetAndResetPassword": "{{\"code\":\"{2}\",\"time\":\"{3}\"}}" //阿里短信此处为Json格式,注意非表示占位的花括号需要用两个表示 {{ }}
},
"PeriodMaxLimits": { //周期次数限制
"NONE_LoginValidError": 1, //登录错误校验比较特殊,需要设置为1,即一个周期内只允许设置一次值
"NONE_ForgetAndResetPassword": 10,
"EMAIL_ForgetAndResetPassword": 5,
"SMS_ForgetAndResetPassword": 5,
"ALIBABASMS_ForgetAndResetPassword": 5
},
"PeriodLimitSeconds": { //周期时间限制(秒)
"NONE_LoginValidError": 3600, //登录错误校验的周期限制,一般为24小时,Demo设置为1小时
"NONE_ForgetAndResetPassword": 120,
"EMAIL_ForgetAndResetPassword": 3600,
"SMS_ForgetAndResetPassword": 3600,
"ALIBABASMS_ForgetAndResetPassword": 3600
},
"PeriodLimitIntervalSeconds": { //周期内校验码发送间隔限制(秒)
//"NONE_LoginValidError": 30, //因为登录错误一个周期只允许发一次,所以这里可以不用设置
"NONE_ForgetAndResetPassword": 40, //对应验证码有效时间配置为30,超出部分无效且会造成CD读取到的时间在最后10秒突然没了
"SMS_ForgetAndResetPassword": 60,
"ALIBABASMS_ForgetAndResetPassword": 60
},
"CodeEffectiveSeconds": { //验证码有效时间(秒)
"NONE_LoginValidError": 3600, //登录错误校验的验证码有效期需与周期时间限制一致
"NONE_ForgetAndResetPassword": 30,
"Console_ForgetAndResetPassword": 40,
"EMAIL_ForgetAndResetPassword": 600,
"SMS_ForgetAndResetPassword": 120,
"ALIBABASMS_ForgetAndResetPassword": 120
},
"CodeMaxErrorLimits": { //校验错误次数
"NONE_LoginValidError": 5, //设置一个周期内,密码错误允许连续错误几次
"NONE_ForgetAndResetPassword": 3,
"Console_ForgetAndResetPassword": 5,
"EMAIL_ForgetAndResetPassword": 5,
"SMS_ForgetAndResetPassword": 5,
"ALIBABASMS_ForgetAndResetPassword": 5
}
},
//以下为业务测试数据,实际不应该走配置
"CurrentSenderKey": "Console",
"BizFlag": "ForgetAndResetPassword", //LoginValidError
"Receiver": "test"
}