update doc with auth
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
28e082f0fc
commit
020f7c83bb
1 changed files with 19 additions and 0 deletions
19
docs/api.md
19
docs/api.md
|
|
@ -6,6 +6,25 @@ Toutes les réponses sont en `application/json`. Les erreurs retournent `{"error
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Authentification
|
||||||
|
|
||||||
|
Toutes les routes (sauf `GET /health`) requièrent le header :
|
||||||
|
|
||||||
|
```
|
||||||
|
X-Owner-ID: <integer>
|
||||||
|
```
|
||||||
|
|
||||||
|
En dev, c'est l'ID numérique de l'owner. Les comptes, transactions et snapshots sont strictement filtrés par owner — un owner ne peut ni voir ni modifier les ressources d'un autre.
|
||||||
|
|
||||||
|
**Réponse `401`** — header absent ou invalide
|
||||||
|
```json
|
||||||
|
{ "error": "missing X-Owner-ID header" }
|
||||||
|
```
|
||||||
|
|
||||||
|
> À remplacer par JWT en production.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Health
|
## Health
|
||||||
|
|
||||||
### `GET /health`
|
### `GET /health`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue