bruno/packages/bruno-tests/collection_level_oauth2/collection.bru
lohit 858536e13d
feat(#1003): collection level oauth2, access_token_url & scope for 'Client Credentials' and 'Password Credentials' grant types (#1691)
* feat(#1003): authorization_code grant type PKCE support, code cleanup..
---------

Co-authored-by: lohit-1 <lohit@usebruno.com>
2024-03-04 15:21:05 +05:30

31 lines
651 B
Plaintext

headers {
check: again
}
auth {
mode: oauth2
}
auth:oauth2 {
grant_type: authorization_code
callback_url: {{authorization_code_callback_url}}
authorization_url: {{authorization_code_authorize_url}}
access_token_url: {{authorization_code_access_token_url}}
client_id: {{client_id}}
client_secret: {{client_secret}}
scope:
pkce: true
}
script:post-response {
if(req.getAuthMode() == 'oauth2' && res.body.access_token) {
bru.setEnvVar('access_token_set_by_collection',res.body.access_token)
}
}
docs {
# bruno-testbench 🐶
This is a test collection that I am using to test various functionalities around bruno
}