# Backend Authentication Configuration Fragment

[[elements]]
border_top = true
border_bottom = false
name = "backend_auth_header"
title = "🔐 Authentication & Authorization"
type = "section_header"

[[elements]]
default = "jwt"
help = "Authentication method: jwt, oauth2, mfa"
name = "auth_method"
nickel_path = ["vapora", "backend", "auth", "method"]
options = ["jwt", "oauth2", "mfa"]
prompt = "Auth Method"
required = true
type = "select"

[[elements]]
default = ""
help = "JWT secret key (leave empty to generate automatically)"
name = "jwt_secret"
nickel_path = ["vapora", "backend", "auth", "jwt_secret"]
prompt = "JWT Secret"
required = false
type = "password"

[[elements]]
default = 3600
help = "JWT token TTL in seconds (1 hour = 3600)"
max = 2592000
min = 300
name = "jwt_ttl"
nickel_path = ["vapora", "backend", "auth", "jwt_ttl"]
prompt = "JWT TTL (seconds)"
required = true
type = "number"

[[elements]]
default = false
help = "Enable multi-factor authentication"
name = "mfa_enabled"
nickel_path = ["vapora", "backend", "auth", "mfa_enabled"]
prompt = "Enable MFA"
required = false
type = "bool"

[[elements]]
default = false
help = "Enable audit logging for all operations"
name = "audit_logging"
nickel_path = ["vapora", "backend", "auth", "audit_logging"]
prompt = "Enable Audit Logging"
required = false
type = "bool"
