Skip to content

Commit 9510f99

Browse files
authored
feat(bruno): add grant cancellation request (#3458)
1 parent 6bcf7c7 commit 9510f99

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
meta {
2+
name: Grant Cancel
3+
type: http
4+
seq: 3
5+
}
6+
7+
delete {
8+
url: {{continueUri}}
9+
body: none
10+
auth: none
11+
}
12+
13+
headers {
14+
Authorization: GNAP {{continueToken}}
15+
}
16+
17+
script:pre-request {
18+
const scripts = require('./scripts');
19+
20+
await scripts.addSignatureHeaders();
21+
}

bruno/collections/Rafiki/Open Payments Auth APIs/Grants/Grant Request.bru

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,12 @@ script:post-response {
6666
const scripts = require('./scripts');
6767

6868
scripts.storeTokenDetails();
69+
70+
// save continue uri
71+
const responseJson = res.body;
72+
if (res?.body?.continue?.uri) {
73+
bru.setEnvVar('continueUri', res.body.continue.uri);
74+
} else {
75+
console.warn('continue.uri not found in response');
76+
}
6977
}

0 commit comments

Comments
 (0)