M8: add operational authentication mode

This commit is contained in:
NuklearRabbit
2026-08-10 02:06:50 +02:00
parent 4cdf667dc1
commit 0bfcf71ff7
20 changed files with 345 additions and 24 deletions
+6
View File
@@ -7,6 +7,7 @@ from fastapi.responses import JSONResponse
from app.api.routers import (
audit,
auth,
bookings,
dashboard,
data_quality,
@@ -19,7 +20,9 @@ from app.api.routers import (
vehicles,
workflows,
)
from app.api.routers.auth import bootstrap_initial_admin
from app.core.config import PRODUCT_NAME, get_settings
from app.core.db import SessionLocal
from app.core.errors import AppError, error_body
from app.services.dispatcher import start_background_dispatcher, stop_background_dispatcher
@@ -28,6 +31,8 @@ settings = get_settings()
@asynccontextmanager
async def lifespan(_app: FastAPI):
with SessionLocal() as db:
bootstrap_initial_admin(db)
start_background_dispatcher()
yield
stop_background_dispatcher()
@@ -81,6 +86,7 @@ def system_status() -> dict[str, object]:
app.include_router(demo.router)
app.include_router(auth.router)
app.include_router(dashboard.router)
app.include_router(vehicles.router)
app.include_router(bookings.router)