namespace ZB.MOM.WW.MxGateway.Server.Configuration;
public sealed class AuthenticationOptions
{
/// Gets the authentication mode.
public AuthenticationMode Mode { get; init; } = AuthenticationMode.ApiKey;
///
/// Gets the SQLite database path for authentication credentials. The default is
/// derived from
/// (C:\ProgramData on Windows, /usr/share or the container equivalent
/// elsewhere) so the credential store never lands in the launch working directory on a
/// non-Windows host. The production hosts override this with an explicit path in
/// appsettings.json; the validator rejects a non-rooted override.
///
public string SqlitePath { get; init; } = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),
"MxGateway",
"gateway-auth.db");
/// Gets the secret manager name for API key pepper.
public string PepperSecretName { get; init; } = "MxGateway:ApiKeyPepper";
/// Gets whether database migrations should run on startup.
public bool RunMigrationsOnStartup { get; init; } = true;
}