Commit 6440ec69 authored by Zohten's avatar Zohten

moved requests

parent 1a798afd
GET http://localhost/index.php/user
###
GET http://localhost/index.php/user/3
###
POST http://localhost/index.php/login
{
"login": "dupontd95",
"pwd": "hasheddupontpwd"
}
###
PUT http://localhost/index.php/user/3
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDYyNDY5MDQsImV4cCI6MTYwNjI1MDUwNCwiaXNzIjoibG9jYWxob3N0IiwiZGF0YSI6eyJpZCI6IjMiLCJmaXJzdG5hbWUiOiJkdXBvbnQiLCJsYXN0bmFtZSI6ImR1cG9uZCIsImVtYWlsIjoiZHVwb250LmR1cG9uZEBmcmVlLmZyIn19.i3AK4t5UC0DLl4SKwUbjt4odPF_RMH3UopiVamgIJcM
{
"id": "3",
"email": "dupont.dupond@free.fr"
}
###
\ No newline at end of file
### Récupérer tous les users
GET http://localhost/index.php/user
### Récupérer le user avec id 3
GET http://localhost/index.php/user/3
### Récupérer un token utilisateur
POST http://localhost/index.php/login
{
"login": "dupontd95",
"pwd": "hasheddupontpwd"
}
### Récupérer un token admin
POST http://localhost/index.php/login
{
"login": "admin",
"pwd": "hashedadminpwd"
}
### Utiliser le token pour modification du user
PUT http://localhost/index.php/user/3
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDYyOTE4NzUsImV4cCI6MTYwNjI5NTQ3NSwiaXNzIjoibG9jYWxob3N0IiwiZGF0YSI6eyJpZCI6IjMiLCJyb2xlIjoiMSIsImVtYWlsIjoiZHVwb250LmR1cG9uZEBmcmVlLmZyIn19.59CpcB3dkjra0GlrfHdpY8_Fsp-Zj4BQ1RCuaePin50
{
"id": "3",
"email": "dupont.dupond@free.fr"
}
### Ajouter un nouvel utilisateur
POST http://localhost/index.php/user
{
"login": "3",
"pwd": "hashedNEWUSERpwd",
"avatar": "avatarnew.png",
"lastname": "NEW",
"firstname": "USER",
"mail": "new.user@free.fr"
}
### Suppresion d'un user par un admin
DELETE http://localhost/index.php/user/8
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDYyOTY5OTMsImV4cCI6MTYwNjMwMDU5MywiaXNzIjoibG9jYWxob3N0IiwiZGF0YSI6eyJpZCI6IjciLCJyb2xlIjoiMiIsImVtYWlsIjoiYmVsb3ZlZC5hZG1pbkBmcmVlLmZyIn19.Pbfi9AWUnfN7ecZy4Up4TngfmKxmIWqxvgghp5SJzeQ
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment