Enhance AppConfig with JWT settings and update Program.cs for improved authentication handling. Modify README.md to reflect new environment variable structure for configuration.
This commit is contained in:
@@ -12,7 +12,16 @@ public class AppConfig
|
||||
public string? InsecureDevEmail { get; set; }
|
||||
public string[] AllowedOrigins { get; set; } = ["http://localhost:3000", "https://localhost:3000"];
|
||||
|
||||
// JWT configuration
|
||||
public string NameClaimType { get; set; } = "name";
|
||||
public string RoleClaimType { get; set; } = "role";
|
||||
public string EmailClaimType { get; set; } = "email";
|
||||
public string AuthRequestEmailHeader { get; set; } = "X-Auth-Request-Email";
|
||||
public TimeSpan ClockSkew { get; set; } = TimeSpan.FromMinutes(5);
|
||||
|
||||
public string ConnectionString =>
|
||||
$"Host={DbHost};Port={DbPort};Database={DbName};Username={DbUser};Password={DbPassword}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user