-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.http
60 lines (45 loc) · 1.45 KB
/
test.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@url=http://localhost:3001
###
POST {{url}}/signup
Content-Type: application/json
{
"username": "test1",
"password": "123456"
}
### Authenticate
POST {{url}}/login
Content-Type: application/json
{
"username": "test1",
"password": "123456"
}
###
POST {{url}}/logout
Content-Type: application/json
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzNjNWZlNmI0ZWExMDk0ODhiOTY4MTYiLCJpYXQiOjE2NjQ5Nzg5NTEsImV4cCI6MTY2NDk4NjE1MX0.CJ5Xu44t35XDjAmeflvo8uO5C4kHg6abKUMzN_02DCg"
}
### Assign role to user "/user/assign/:userId/:roleId"
POST {{url}}/user/assign/633c395a6c201b3740adf14e/633c031ba3d08d231ece5d9b
### Verify role for user "/user/role/:roleId"
POST {{url}}/user/role/633c031ba3d08d231ece5d9b
Content-Type: application/json
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzNjNWZlNmI0ZWExMDk0ODhiOTY4MTYiLCJpYXQiOjE2NjQ5Nzg5NTEsImV4cCI6MTY2NDk4NjE1MX0.CJ5Xu44t35XDjAmeflvo8uO5C4kHg6abKUMzN_02DCg"
}
### Get all roles
POST {{url}}/user/all-roles
Content-Type: application/json
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MzNjNWZlNmI0ZWExMDk0ODhiOTY4MTYiLCJpYXQiOjE2NjQ5Nzg5NTEsImV4cCI6MTY2NDk4NjE1MX0.CJ5Xu44t35XDjAmeflvo8uO5C4kHg6abKUMzN_02DCg"
}
### Delete user test
DELETE {{url}}/user/633bf9f5a22518b4f0435861
### Create role test
POST {{url}}/role/create
Content-Type: application/json
{
"value": "guest"
}
### Delete role test
DELETE {{url}}/role/633bfa17a22518b4f0435866