26 lines
367 B
Plaintext
26 lines
367 B
Plaintext
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);
|
|
}
|
|
}
|