Meilenstein 1: Grundgerüst mit Login, Sessions und CSRF

- FastAPI-App mit SQLite-Schema (admins, sessions, connections)
- Login mit Argon2, serverseitige Sessions (Token nur gehasht gespeichert)
- Cookie HttpOnly/Secure/SameSite=Strict, CSRF-Token für schreibende Requests
- scripts/create_admin.py zum Anlegen und Zurücksetzen von Admins
- Einfaches Frontend mit Login
- pytest-Tests, gepinnte requirements.txt, .env.example, .gitignore
- SETUP.md Teil 4 ergänzt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dbildhauerandClaude Opus 5.5 committed 2026-11-20 20:41:15 +01:00
1 parent 403606ff66
commit 293367f33e
18 files changed
+837 -6

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
"""Pydantic-Modelle für Requests und Responses."""
from pydantic import BaseModel, Field
class LoginRequest(BaseModel):
benutzername: str = Field(min_length=1, max_length=64)
passwort: str = Field(min_length=1, max_length=1024)
class AdminInfo(BaseModel):
id: int
benutzername: str
csrf_token: str