using JNPF.Common.Enums; using JNPF.DependencyInjection; using JNPF.JsonSerialization; using JNPF.Systems.Entitys.Enum; using Newtonsoft.Json; namespace JNPF.OAuth.Model; /// /// 登录时需要的系统配置. /// [SuppressSniffer] public class SysConfigByOAuthModel { /// /// 是否开启验证码(0:不启用,1:启用). /// [JsonConverter(typeof(BoolJsonConverter))] public bool enableVerificationCode { get; set; } /// /// 错误策略(1:账号锁定,2:延时登录). /// public ErrorStrategy lockType { get; set; } /// /// 错误密码次数. /// public int passwordErrorsNumber { get; set; } = 6; /// /// 延时登录时间(分钟). /// public int lockTime { get; set; } = 10; /// /// 是否开启白名单验证. /// [JsonConverter(typeof(BoolJsonConverter))] public bool whitelistSwitch { get; set; } /// /// 白名单. /// public string whiteListIp { get; set; } /// /// 超时登出. /// public long tokenTimeout { get; set; } /// /// 单一登录方式(1:后登录踢出先登录 2:同时登录). /// public LoginMethod singleLogin { get; set; } }