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
|
||||
}
|
||||
Reference in New Issue
Block a user