Initial commit
This commit is contained in:
17
MealPlan.Api/Services/JwtOptions.cs
Normal file
17
MealPlan.Api/Services/JwtOptions.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace MealPlan.Api.Services;
|
||||
|
||||
/// <summary>Strongly-typed JWT settings bound from the "Jwt" configuration section / env vars.</summary>
|
||||
public class JwtOptions
|
||||
{
|
||||
public const string SectionName = "Jwt";
|
||||
|
||||
public string Secret { get; set; } = string.Empty;
|
||||
public string Issuer { get; set; } = string.Empty;
|
||||
public string Audience { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Access-token lifetime in minutes. Defaults to 15 per the security spec.</summary>
|
||||
public int AccessTokenMinutes { get; set; } = 15;
|
||||
|
||||
/// <summary>Refresh-token lifetime in days. Defaults to 7 per the security spec.</summary>
|
||||
public int RefreshTokenDays { get; set; } = 7;
|
||||
}
|
||||
Reference in New Issue
Block a user