2026-03-16 09:47:02 -03:00
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
from pydantic import Field
|
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
|
|
|
model_config = SettingsConfigDict(env_prefix="AUTH_GATEWAY_", extra="ignore")
|
|
|
|
|
|
|
|
|
|
config_dir: Path = Field(default=Path("/caddy_json_export"))
|
|
|
|
|
database_path: Path = Field(default=Path("/data/auth-gateway.sqlite3"))
|
|
|
|
|
cookie_name: str = Field(default="auth_gateway_session")
|
2026-03-16 20:23:18 -03:00
|
|
|
csrf_cookie_name: str = Field(default="auth_gateway_csrf")
|
2026-03-16 09:47:02 -03:00
|
|
|
external_path: str = Field(default="/auth-gateway")
|
|
|
|
|
secure_cookies: bool = Field(default=True)
|
|
|
|
|
session_default_minutes: int = Field(default=720)
|
|
|
|
|
oidc_state_ttl_minutes: int = Field(default=10)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
settings = Settings()
|