Rename bruno files to match names of rest resources
This commit is contained in:
parent
195fbc52ad
commit
58a581fbac
14 changed files with 0 additions and 0 deletions
8
bruno/recipe-backend/AuthRestResource/folder.bru
Normal file
8
bruno/recipe-backend/AuthRestResource/folder.bru
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
meta {
|
||||
name: AuthPoint
|
||||
seq: 2
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
28
bruno/recipe-backend/AuthRestResource/login.bru
Normal file
28
bruno/recipe-backend/AuthRestResource/login.bru
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
meta {
|
||||
name: login
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/auth/login
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"userName": "{{username}}",
|
||||
"password": "{{password}}"
|
||||
}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
const body = res.getBody()
|
||||
bru.setEnvVar("token", body.token)
|
||||
bru.setEnvVar("tokenExpireDate", new Date().valueOf() + (body.expiryDate))
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue