Class JwtSettings
- Namespace
- SEBT.Portal.Core.AppSettings
- Assembly
- SEBT.Portal.Core.dll
Configuration settings for JWT token generation.
public class JwtSettings : IHaveConfigSectionName
- Inheritance
-
objectJwtSettings
- Implements
Remarks
Idle and absolute timeouts together implement the session lifetime policy described in OWASP Session Management and NIST SP 800-63B (§7.1, IAL2 sessions: ≤30 min idle, ≤12 hr absolute). The portal's defaults are tighter than the NIST ceiling.
Properties
AbsoluteExpirationMinutes
Absolute session lifetime, in minutes, measured from the user's original
authentication time (auth_time claim). Refresh requests are rejected
once this cap is reached, regardless of activity. Must be greater than or
equal to ExpirationMinutes — enforced by JwtSettingsValidator.
[Range(1, 1440, ErrorMessage = "AbsoluteExpirationMinutes must be between 1 and 1440 (24 hours).")]
public int AbsoluteExpirationMinutes { get; set; }
Property Value
- int
Audience
The audience of the JWT token.
[Required(ErrorMessage = "Audience is required.")]
public string Audience { get; set; }
Property Value
- string
ExpirationMinutes
Sliding (idle) session lifetime, in minutes. The session cookie is renewed on activity-driven refresh; an idle session expires when this window elapses.
[Range(1, 1440, ErrorMessage = "ExpirationMinutes must be between 1 and 1440 (24 hours).")]
public int ExpirationMinutes { get; set; }
Property Value
- int
Issuer
The issuer of the JWT token.
[Required(ErrorMessage = "Issuer is required.")]
public string Issuer { get; set; }
Property Value
- string
SecretKey
The secret key used to sign JWT tokens.
[Required(ErrorMessage = "SecretKey is required.")]
[MinLength(32, ErrorMessage = "SecretKey must be at least 32 characters long.")]
public string SecretKey { get; set; }
Property Value
- string
SectionName
public static string SectionName { get; }
Property Value
- string