Skip to content
Snippets Groups Projects
Commit 63db4993 authored by HeJ's avatar HeJ
Browse files

Merge branch 'document-api-auth' into 'develop'

document API authentication

See merge request hub/hub!1145
parents bf22e0b5 76a5ff95
No related branches found
No related tags found
No related merge requests found
...@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment