### Récupérer tous les users GET http://localhost/index.php/user Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDcwOTQyNjIsImV4cCI6MTYwNzA5Nzg2MiwiaXNzIjoibG9jYWxob3N0IiwiZGF0YSI6eyJpZCI6IjciLCJyb2xlIjoiMiIsImVtYWlsIjoiYmVsb3ZlZC5hZG1pbkBmcmVlLmZyIn19.uQTflrpgfkiI3PS3PXHI2srBpNk8uqENHDHWX-48zGk ### 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": "testtest", "pwd": "$2a$10$4AAhcsd4FpiPvUS718BemuGivzgRcsgxWbaSNdD.dK4wNwJAn.lQO" } ### Tenter de récupérer un token utilisateur bloqué POST http://localhost/index.php/login { "login": "kevinlekikou", "pwd": "hashedkevinlekikoupwd" } ### 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": "NEWUSER", "pwd": "$2a$10$4AAhcsd4FpiPvUS718BemuGivzgRcsgxWbaSNdD.dK4wNwJAn.lQO", "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