Files
tnb.server/system/Tnb.OAuth/Model/SysConfigByOAuthModel.cs
2023-03-13 15:00:34 +08:00

56 lines
1.4 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using JNPF.Common.Enums;
using JNPF.DependencyInjection;
using JNPF.JsonSerialization;
using JNPF.Systems.Entitys.Enum;
using Newtonsoft.Json;
namespace JNPF.OAuth.Model;
/// <summary>
/// 登录时需要的系统配置.
/// </summary>
[SuppressSniffer]
public class SysConfigByOAuthModel
{
/// <summary>
/// 是否开启验证码0不启用1启用.
/// </summary>
[JsonConverter(typeof(BoolJsonConverter))]
public bool enableVerificationCode { get; set; }
/// <summary>
/// 错误策略1账号锁定2延时登录.
/// </summary>
public ErrorStrategy lockType { get; set; }
/// <summary>
/// 错误密码次数.
/// </summary>
public int passwordErrorsNumber { get; set; } = 6;
/// <summary>
/// 延时登录时间(分钟).
/// </summary>
public int lockTime { get; set; } = 10;
/// <summary>
/// 是否开启白名单验证.
/// </summary>
[JsonConverter(typeof(BoolJsonConverter))]
public bool whitelistSwitch { get; set; }
/// <summary>
/// 白名单.
/// </summary>
public string whiteListIp { get; set; }
/// <summary>
/// 超时登出.
/// </summary>
public long tokenTimeout { get; set; }
/// <summary>
/// 单一登录方式1后登录踢出先登录 2同时登录.
/// </summary>
public LoginMethod singleLogin { get; set; }
}