semantics
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# #region AuthConfigModule [C:2] [TYPE Module] [SEMANTICS pydantic, auth, auth-config, config]
|
||||
#
|
||||
# @BRIEF Centralized configuration for authentication and authorization.
|
||||
# @LAYER: Core
|
||||
# @RELATION DEPENDS_ON -> pydantic
|
||||
# @LAYER Core
|
||||
# @RELATION DEPENDS_ON -> [EXT:Library:pydantic]
|
||||
#
|
||||
# @INVARIANT: All sensitive configuration must be loaded from environment; no hardcoded secrets.
|
||||
# @INVARIANT All sensitive configuration must be loaded from environment; no hardcoded secrets.
|
||||
# @RATIONALE SECRET_KEY and AUTH_DATABASE_URL now crash-early if env vars are missing.
|
||||
# Dev fallback for AUTH_DATABASE_URL only when DEV_MODE=true.
|
||||
# @REJECTED Default secrets in source code rejected — Class 1 security violation:
|
||||
@@ -19,9 +19,9 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
# #region AuthConfig [TYPE Class]
|
||||
# @BRIEF Holds authentication-related settings.
|
||||
# @PRE: Environment variables may be provided via .env file.
|
||||
# @POST: Returns a configuration object with validated settings.
|
||||
# @RELATION INHERITS -> pydantic_settings.BaseSettings
|
||||
# @PRE Environment variables may be provided via .env file.
|
||||
# @POST Returns a configuration object with validated settings.
|
||||
# @RELATION INHERITS -> [EXT:Library:pydantic_settings.BaseSettings]
|
||||
class AuthConfig(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user