forked from xiongyuxing/tiku-backend.net
23 lines
744 B
C#
23 lines
744 B
C#
namespace Tiku.Application.Security;
|
|
|
|
public sealed class JwtOptions
|
|
{
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public string Issuer { get; set; } = "tiku-backend";
|
|
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public string Audience { get; set; } = "tiku-api";
|
|
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
[System.ComponentModel.DataAnnotations.MinLength(32)]
|
|
public string SigningKey { get; set; } = string.Empty;
|
|
|
|
[System.ComponentModel.DataAnnotations.Range(1, 1440)]
|
|
public int AccessTokenMinutes { get; set; } = 30;
|
|
|
|
[System.ComponentModel.DataAnnotations.Range(1, 365)]
|
|
public int RefreshTokenDays { get; set; } = 30;
|
|
|
|
public bool ValidateSessions { get; set; } = true;
|
|
}
|