Initial commit.
This commit is contained in:
25
rest-client-collection/Imagora/Users/Login as Admin.bru
Normal file
25
rest-client-collection/Imagora/Users/Login as Admin.bru
Normal file
@@ -0,0 +1,25 @@
|
||||
meta {
|
||||
name: Login as Admin
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/users/login
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"username": "Admin",
|
||||
"password": "P@ssword!"
|
||||
}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
if (res.status === 200) {
|
||||
bru.setEnvVar('userId', res.body.refreshToken.userId);
|
||||
bru.setEnvVar('jwt', res.body.accessToken);
|
||||
}
|
||||
}
|
||||
25
rest-client-collection/Imagora/Users/Login as Florian.bru
Normal file
25
rest-client-collection/Imagora/Users/Login as Florian.bru
Normal file
@@ -0,0 +1,25 @@
|
||||
meta {
|
||||
name: Login as Florian
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/users/login
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"username": "Florian",
|
||||
"password": "P@ssword!"
|
||||
}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
if (res.status === 200) {
|
||||
bru.setEnvVar('userId', res.body.refreshToken.userId);
|
||||
bru.setEnvVar('jwt', res.body.accessToken);
|
||||
}
|
||||
}
|
||||
25
rest-client-collection/Imagora/Users/Login as Thomas.bru
Normal file
25
rest-client-collection/Imagora/Users/Login as Thomas.bru
Normal file
@@ -0,0 +1,25 @@
|
||||
meta {
|
||||
name: Login as Thomas
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/users/login
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"username": "Joux",
|
||||
"password": "P@ssword!"
|
||||
}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
if (res.status === 200) {
|
||||
bru.setEnvVar('userId', res.body.refreshToken.userId);
|
||||
bru.setEnvVar('jwt', res.body.accessToken);
|
||||
}
|
||||
}
|
||||
26
rest-client-collection/Imagora/Users/Signup.bru
Normal file
26
rest-client-collection/Imagora/Users/Signup.bru
Normal file
@@ -0,0 +1,26 @@
|
||||
meta {
|
||||
name: Signup
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/api/users
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"pseudo": "Admin",
|
||||
"email": "admin@admin.com",
|
||||
"password": "P@ssword!"
|
||||
}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
if (res.status === 200) {
|
||||
bru.setEnvVar('userId', res.body.refreshToken.userId);
|
||||
bru.setEnvVar('jwt', res.body.accessToken);
|
||||
}
|
||||
}
|
||||
4
rest-client-collection/Imagora/Users/folder.bru
Normal file
4
rest-client-collection/Imagora/Users/folder.bru
Normal file
@@ -0,0 +1,4 @@
|
||||
meta {
|
||||
name: Users
|
||||
seq: 6
|
||||
}
|
||||
9
rest-client-collection/Imagora/bruno.json
Normal file
9
rest-client-collection/Imagora/bruno.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": "1",
|
||||
"name": "Imagora",
|
||||
"type": "collection",
|
||||
"ignore": [
|
||||
"node_modules",
|
||||
".git"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
vars {
|
||||
url: http://localhost:8080
|
||||
jwt: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2N2VkZWUzYS00NmJiLTQ2OWItODRhZi0zNDA0Zjg0NDA1MTMiLCJleHAiOjE3NDY5NTYwMzMsInBzZXVkbyI6IkpvdXgiLCJlbWFpbCI6InRob21hcy5qb3V4QGdtYWlsLmNvbSIsInJvbGVzIjoiU1RBTkRBUkQifQ.O1I-yQeU09GXakktvBMY3QpSJS_PnLgIVFiMiqPQJOjaJ5z852R90rPHc76qKUBTuUqSmR-YFBGPNYa37e1xyg
|
||||
userId: 67edee3a-46bb-469b-84af-3404f8440513
|
||||
}
|
||||
Reference in New Issue
Block a user