Files
Atomx/Atomx.Common/Models/JwtSetting.cs
2025-12-04 00:40:12 +08:00

47 lines
1.3 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 System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Atomx.Common.Models
{
public class JwtSetting
{
/// <summary>
/// 令牌的颁发者,一般就写成域名,实际可任意
/// </summary>
public string Issuer { get; set; } = string.Empty;
/// <summary>
/// 颁发给谁,一般写成项目名,实际可任意
/// </summary>
public string Audience { get; set; } = string.Empty;
/// <summary>
/// 签名验证的KEY,至少 128bit 即16个英文字符以上实际可任意英文字符
/// </summary>
public string SecurityKey { get; set; } = string.Empty;
/// <summary>
/// 过期时间
/// </summary>
public int ClockSkew { get; set; }
/// <summary>
/// 访问令牌过期时间
/// </summary>
public int AccessTokenExpirationMinutes { get; set; }
/// <summary>
/// 刷新令牌过期时间
/// </summary>
public int RefreshTokenExpirationMinutes { get; set; }
/// <summary>
/// 每个用户刷新令牌最大数量
/// </summary>
public int MaxRefreshTokensPerUser { get; set; }
}
}