Add signup/signin with backend-issued JWT (Argon2 passwords in SurrealDB), role-based authorization policies, per-user data access levels, consent register and read audit log. Protect user endpoints and record sensitive reads.
19 lines
573 B
C#
19 lines
573 B
C#
namespace TarninaHub.Infrastructure.Auth;
|
|
|
|
public sealed class AuthSettings
|
|
{
|
|
public string Issuer { get; set; } = "tarninahub";
|
|
|
|
public string Audience { get; set; } = "tarninahub";
|
|
|
|
/// <summary>
|
|
/// HMAC signing key (min. 32 bytes). Must come from configuration/secrets
|
|
/// (env `Auth__SigningKey`) — never hardcoded for production environments.
|
|
/// </summary>
|
|
public string SigningKey { get; set; } = string.Empty;
|
|
|
|
public int TokenLifetimeMinutes { get; set; } = 60;
|
|
|
|
public bool HasUsableSigningKey => SigningKey.Length >= 32;
|
|
}
|