- Anmeldung über Argon2id und JWT in httpOnly-Cookies, Refresh mit echter Rotation über die neue Tabelle refresh_token - AuthProvider-Protokoll als Vorbereitung für OIDC, Administrator-Anlage beim Erststart mit erzwungenem Passwortwechsel - CRUD für Konten, Kategorien (zweistufiger Baum), Firmen, Recurrences, Preisversionen, Buchungen, Budgets, Vorlagen und Sparziele - Fälligkeiten mit Overlay-Logik: abrufen, bestätigen, auslassen, zurücksetzen - Kontosalden zum Stichtag, Monatsübersicht mit Plan-Ist-Vergleich - SECRET_KEY jetzt mindestens 32 Zeichen; Platzhalter in Produktion abgelehnt - 61 neue Integrationstests, insgesamt 148 grün Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014e7t8UpmoVNMtWivY5LiSH
46 lines
1.2 KiB
Python
46 lines
1.2 KiB
Python
"""Sammelrouter für alle /api-Endpunkte.
|
|
|
|
Alle Routen außer `/api/auth/*`, `/api/me` und den Systemendpunkten erfordern
|
|
eine gültige Anmeldung **und** einen abgeschlossenen Passwortwechsel.
|
|
"""
|
|
|
|
from fastapi import APIRouter, Depends
|
|
|
|
from app.api.deps import get_active_user
|
|
from app.api.routes import (
|
|
accounts,
|
|
auth,
|
|
budgets,
|
|
categories,
|
|
me,
|
|
merchants,
|
|
occurrences,
|
|
recurrences,
|
|
reports,
|
|
savings_goals,
|
|
system,
|
|
transactions,
|
|
)
|
|
|
|
api_router = APIRouter(prefix="/api")
|
|
|
|
# Ohne Authentifizierung erreichbar.
|
|
api_router.include_router(system.router)
|
|
api_router.include_router(auth.router)
|
|
api_router.include_router(me.router)
|
|
|
|
# Alles Weitere nur für angemeldete Benutzer.
|
|
protected = APIRouter(dependencies=[Depends(get_active_user)])
|
|
protected.include_router(accounts.router)
|
|
protected.include_router(categories.router)
|
|
protected.include_router(merchants.router)
|
|
protected.include_router(recurrences.router)
|
|
protected.include_router(occurrences.router)
|
|
protected.include_router(transactions.router)
|
|
protected.include_router(budgets.router)
|
|
protected.include_router(budgets.templates)
|
|
protected.include_router(savings_goals.router)
|
|
protected.include_router(reports.router)
|
|
|
|
api_router.include_router(protected)
|