Skip to content

Commit

Permalink
Closes #60
Browse files Browse the repository at this point in the history
Update Bruno collections
  • Loading branch information
mtracewicz committed Sep 10, 2024
1 parent 59edf1d commit 6601d55
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
12 changes: 6 additions & 6 deletions backend/bruno/KSummarized/ToDo/List/Create.bru
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ meta {
}

post {
url: https://localhost:5000/api/todo/lists
body: json
url: https://localhost:5000/api/todo/lists?name=kenobi
body: none
auth: bearer
}

params:query {
name: kenobi
}

auth:bearer {
token: {{token}}
}

body:json {
"ToDo"
}

vars:post-response {
listId: res.body.id
}
10 changes: 9 additions & 1 deletion backend/bruno/KSummarized/environments/Local.bru
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
vars {
keycloak_realm: KnowledgeSummarized
keycloak_url: http://localhost:8080
}
vars:secret [
token
token,
keycloak_client_id,
keycloak_client_secret,
keycloak_username,
keycloak_password
]
23 changes: 23 additions & 0 deletions backend/bruno/KSummarized/token.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
meta {
name: Get access token
type: http
seq: 1
}

post {
url: {{keycloak_url}}/realms/{{keycloak_realm}}/protocol/openid-connect/token
body: formUrlEncoded
auth: none
}

body:form-urlencoded {
client_id: {{keycloak_client_id}}
grant_type: password
client_secret: {{keycloak_client_secret}}
username: {{keycloak_username}}
password: {{keycloak_password}}
}

vars:post-response {
token: res.body.access_token
}

0 comments on commit 6601d55

Please sign in to comment.