1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ERP.Framework.Config
- {
- public class SecurityConfig
- {
- #region 密码错误
- /// <summary>
- /// 最大输入密码错误
- /// </summary>
- public int MaxRetryCount { get; set; } = 5;
- /// <summary>
- /// 密码错误锁定时间 (单位:s , 默认10分钟)
- /// </summary>
- public int LockTime { get; set; } = 10 * 60;
- #endregion 密码错误
- /// <summary>
- /// JWT 密匙
- /// </summary>
- public string JwtSecurityKey { get; set; } = "ipl234567890KLmnbvcxz";
- /// <summary>
- /// Token 对应的 Redis 存储时间(单位:分钟 ,默认1天)
- /// </summary>
- public int TimeOut { get; set; } = 60 * 24;
- /// <summary>
- /// Token临时有效期 [指定时间内无操作就视为token过期] (单位: 分钟), 默认30分钟
- /// </summary>
- public int ActivityTimeOut { get; set; } = 30;
- /// <summary>
- /// 一个设备只允许一个账号登录
- /// </summary>
- public bool UseDeviceKey = false;
- /// <summary>
- /// 同一账号,最大登录数量,-1代表不限
- /// </summary>
- public int MaxLoginCount = 5;
- }
- }
|