Skip to content
Snippets Groups Projects

document API authentication

Merged cubicroot requested to merge document-api-auth into develop
1 file
+ 15
0
Compare changes
  • Side-by-side
  • Inline
+ 15
0
@@ -39,6 +39,7 @@ Prodinstanz: <https://api.events.ccc.de/congress/2024/>
@@ -39,6 +39,7 @@ Prodinstanz: <https://api.events.ccc.de/congress/2024/>
| Kategorie | Endpunkt | GET | POST | PUT | DEL | Beschreibung |
| Kategorie | Endpunkt | GET | POST | PUT | DEL | Beschreibung |
| ---------- | ---------------------------------------- | --- | ---- | --- | --- | ----------------------------------------------------- |
| ---------- | ---------------------------------------- | --- | ---- | --- | --- | ----------------------------------------------------- |
 
| Auth | `/auth/get-token` | | x | | | Ausstellen eines API-Tokens |
| Persönlich | `/me` | x | | x | | eigenes Profil / Settings |
| Persönlich | `/me` | x | | x | | eigenes Profil / Settings |
| Persönlich | `/me/friends` | x | | x | x | Liste der Buddies |
| Persönlich | `/me/friends` | x | | x | x | Liste der Buddies |
| Persönlich | `/me/badges` | x | | | | Liste aller Badges/Achievements |
| Persönlich | `/me/badges` | x | | | | Liste aller Badges/Achievements |
@@ -64,6 +65,20 @@ Prodinstanz: <https://api.events.ccc.de/congress/2024/>
@@ -64,6 +65,20 @@ Prodinstanz: <https://api.events.ccc.de/congress/2024/>
Per POST werden neue Einträge angelegt, per PUT bestehende verändert.
Per POST werden neue Einträge angelegt, per PUT bestehende verändert.
Details zu den einzelnen Endpunkten folgen in Kürze™.
Details zu den einzelnen Endpunkten folgen in Kürze™.
 
### API-Beispiel mit cURL
 
 
Zuerst einen Token generieren:
 
 
```bash
 
curl https://{API_URL}/api/auth/get-token -H "Content-Type: application/json" -X POST --data '{"username": "{USERNAME}", "passwort": "{PASSWORD}"}'
 
```
 
 
Mit diesem Token können dann Endpunkte aufgerufen werden die eine Authentifizierung erfordern:
 
 
```bash
 
curl https://{API_URL}/api/me -H "Content-Type: application/json" -H "Authorization: Token {API_TOKEN}"
 
```
 
## Development
## Development
see [Development.md](./Development.md)
see [Development.md](./Development.md)
Loading