Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin Vrel
projet-cdaw
Commits
6440ec69
Commit
6440ec69
authored
Nov 25, 2020
by
Zohten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved requests
parent
1a798afd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
25 deletions
+47
-25
apiRequests.http
BackEnd/src/apiRequests.http
+0
-25
userRequests.http
BackEnd/src/testRequests/userRequests.http
+47
-0
No files found.
BackEnd/src/apiRequests.http
deleted
100644 → 0
View file @
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
BackEnd/src/testRequests/userRequests.http
0 → 100644
View file @
6440ec69
### 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment