feat: Multi-User-Unterstützung mit JWT-Authentifizierung
- User-Modell (username, password_hash, role admin/user, is_active) - Standard-Admin-Benutzer wird beim ersten Start automatisch angelegt - JWT-Tokens (HS256) für Benutzer-Sessions, konfigurierbare Ablaufzeit - API-Key bleibt für service-to-service-Calls (backward-compatible) - POST /api/v1/auth/login → JWT-Token - GET /api/v1/auth/me → aktueller Benutzer - CRUD /api/v1/users/ → Benutzerverwaltung (nur Admin) - TUI zeigt Login-Screen beim Start; nach Erfolg → MainScreen - Passwort-Hashing mit bcrypt (python-jose für JWT)
This commit is contained in:
@@ -126,3 +126,40 @@ Screen {
|
||||
#compose-buttons Button {
|
||||
margin-left: 1;
|
||||
}
|
||||
|
||||
/* ── Login-Screen ──────────────────────────────────────────────────────── */
|
||||
|
||||
#login-container {
|
||||
align: center middle;
|
||||
width: 100%;
|
||||
height: 1fr;
|
||||
}
|
||||
|
||||
#login-title {
|
||||
text-style: bold;
|
||||
text-align: center;
|
||||
margin-bottom: 1;
|
||||
color: $accent;
|
||||
width: 40;
|
||||
}
|
||||
|
||||
#login-container Label {
|
||||
width: 40;
|
||||
margin-top: 1;
|
||||
}
|
||||
|
||||
#login-container Input {
|
||||
width: 40;
|
||||
}
|
||||
|
||||
#login-btn {
|
||||
width: 40;
|
||||
margin-top: 1;
|
||||
}
|
||||
|
||||
#login-error {
|
||||
width: 40;
|
||||
color: $error;
|
||||
text-align: center;
|
||||
height: 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user