move some information in bruno collection to variables
This commit is contained in:
parent
c6cc3b6418
commit
d36e70800c
@ -13,8 +13,8 @@ get {
|
|||||||
auth:oauth2 {
|
auth:oauth2 {
|
||||||
grant_type: authorization_code
|
grant_type: authorization_code
|
||||||
callback_url: https://localhost:1234
|
callback_url: https://localhost:1234
|
||||||
authorization_url: https://login.nifni.net/realms/public_selfhosted/protocol/openid-connect/auth
|
authorization_url: {{keycloak_host}}/realms/{{keycloak_realm}}/protocol/openid-connect/auth
|
||||||
access_token_url: https://login.nifni.net/realms/public_selfhosted/protocol/openid-connect/token
|
access_token_url: {{keycloak_host}}/realms/{{keycloak_realm}}/protocol/openid-connect/token
|
||||||
client_id: casket
|
client_id: casket
|
||||||
client_secret:
|
client_secret:
|
||||||
scope:
|
scope:
|
||||||
@ -24,4 +24,6 @@ auth:oauth2 {
|
|||||||
|
|
||||||
script:post-response {
|
script:post-response {
|
||||||
bru.setVar('access_token', res.body.access_token);
|
bru.setVar('access_token', res.body.access_token);
|
||||||
|
const atob = require('atob');
|
||||||
|
bru.setVar('user_id',JSON.parse(atob(res.body.access_token.split('.')[1])).sub)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: http://localhost:3000/api/v1/user/cdf48a88-f0ae-4c09-acc3-c9f056229d95/download?path=test/blub.txt
|
url: {{casket_host}}/api/v1/user/{{user_id}}/download?path=test/blub.txt
|
||||||
body: none
|
body: none
|
||||||
auth: bearer
|
auth: bearer
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: http://localhost:3000/api/v1/user/cdf48a88-f0ae-4c09-acc3-c9f056229d95/files?path=&nesting=5
|
url: {{casket_host}}/api/v1/user/{{user_id}}/files?path=&nesting=5
|
||||||
body: none
|
body: none
|
||||||
auth: bearer
|
auth: bearer
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get {
|
get {
|
||||||
url: http://localhost:3000/api/v1/user//files
|
url: {{casket_host}}/api/v1/user//files
|
||||||
body: none
|
body: none
|
||||||
auth: bearer
|
auth: bearer
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ meta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
url: http://localhost:3000/api/v1/user/cdf48a88-f0ae-4c09-acc3-c9f056229d95/files
|
url: {{casket_host}}/api/v1/user/{{user_id}}/files
|
||||||
body: multipartForm
|
body: multipartForm
|
||||||
auth: bearer
|
auth: bearer
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user