Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/unsupported token type #2244

Closed

Conversation

pietrygamat
Copy link
Contributor

@pietrygamat pietrygamat commented May 5, 2024

WIP. Disruptive changes to #2061 / #2077

Mateusz Pietryga and others added 8 commits May 5, 2024 15:35
… of api endpoint

Setting oauth2 authorization no longer equals overwriting user-specified data in a request. The pre-requests made to obtain oauth2 access_token are now separated from actual API request.

usebruno#1999
Results of oauth2 authorization flow (i.e. access_token but also refresh_token, id_token, scope or any other information returned from token request) are stored in a collection specific cache. It is persisted in the file system, and will be automatically reused when executing requests until the cache is purged (using Clear Cache button available in all related views).
…ble by scripts

The new variable 'credentials' is now available in 'req' object. It is added automatically during request preparation if oauth2 method is used and is value is either evaluated or retrieved from collection oauth2 cache.
…Token action

The actual the authorization request is now part of request preparation, and its response is returned for post-request script processing.
According to RFC6749 Section 7.1, The client MUST NOT use an access token
if it does not understand the token type. At this point bruno only understands
'bearer' token_type.
…ripts

The pre-request script phase is now executed after configure request. That means that
'req.credentials' object from OAuth2 flows is available even without previously cached
credentials.
@pietrygamat pietrygamat closed this May 6, 2024
@pietrygamat pietrygamat deleted the feature/unsupported_token_type branch May 6, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant