chore: sync
This commit is contained in:
28
docs/wiki/auth.md
Normal file
28
docs/wiki/auth.md
Normal file
@@ -0,0 +1,28 @@
|
||||
## Auth Module
|
||||
|
||||
### Module Description
|
||||
Handles user authentication, session management, and permission checks across the system.
|
||||
|
||||
### API Endpoints & Registration Flow
|
||||
|
||||
1. **POST /auth/login**
|
||||
- Purpose: Benutzerlogin über Session/Cookie
|
||||
- Auth: Keine
|
||||
- Payload: `{"username_or_email": "string", "password": "string"}`
|
||||
- Response: `{"user": {...}}`
|
||||
|
||||
2. **POST /auth/register/step1 ... /step3**
|
||||
- Mehrstufige Registrierung (Rasse → Avatar/Titel → Username/Email/Passwort)
|
||||
- Je Step wird der Draft gespeichert; Step3 erstellt Benutzer mit `activation_token` und nimmt `is_active=false` an, sofern `DEV_ENTWICKLUNG` nicht gesetzt ist.
|
||||
- Response: `201` mit `{ "status": "pending" }` (E-Mail-Link) oder `{ "status": "active", "user": {...} }` (Dev-Bypass).
|
||||
|
||||
3. **POST /auth/register/confirm**
|
||||
- Purpose: Aktivierung per Token-Link (`token` im Body oder Query)
|
||||
- Auth: Keine
|
||||
- Response: `{"user": {...}}` nach erfolgreicher Aktivierung.
|
||||
|
||||
4. **GET /auth/permissions**
|
||||
- Purpose: Berechtigungen abrufen (Session erforderlich)
|
||||
- Auth: Session
|
||||
- Payload: Keine
|
||||
- Response: `{"permissions": ["string"]}`
|
||||
Reference in New Issue
Block a user