First unchecked draft for tags
This commit is contained in:
parent
f936e84168
commit
70b132dc6f
51 changed files with 494 additions and 69 deletions
22
bruno/recipe-backend/UserPoint/changePassword.bru
Normal file
22
bruno/recipe-backend/UserPoint/changePassword.bru
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
meta {
|
||||
name: changePassword
|
||||
type: http
|
||||
seq: 8
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/user/change-password
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"userId": "9c913747-ba57-4b12-87d0-3339f4a8117c",
|
||||
"password": "test"
|
||||
}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
25
bruno/recipe-backend/collection.bru
Normal file
25
bruno/recipe-backend/collection.bru
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
auth {
|
||||
mode: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{token}}
|
||||
}
|
||||
|
||||
script:pre-request {
|
||||
try{
|
||||
// An dieser Stelle muss überprüft werden, ob diese Funktion gerade aufgerufen wird, ansonsten entsteht eine Endlosschleife.
|
||||
const blocked = bru.getEnvVar("blocked");
|
||||
if(blocked === "false" && new Date().valueOf() > Number(bru.getEnvVar("tokenExpireDate"))){
|
||||
console.log('new Session')
|
||||
|
||||
bru.setEnvVar("blocked",true)
|
||||
// Absoluter Pfad von der Collection-Root
|
||||
await bru.runRequest('AuthPoint/login.bru')
|
||||
|
||||
bru.setEnvVar("blocked",false)
|
||||
}
|
||||
} catch (e){
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue