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
Feat: OAuth2: Show details of both token request and user request in the Timeline #2253
Draft
pietrygamat
wants to merge
17
commits into
usebruno:main
Choose a base branch
from
pietrygamat:feature/inherit-oauth+basic-auth-client-credentials
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Feat: OAuth2: Show details of both token request and user request in the Timeline #2253
pietrygamat
wants to merge
17
commits into
usebruno:main
from
pietrygamat:feature/inherit-oauth+basic-auth-client-credentials
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pietrygamat
force-pushed
the
feature/inherit-oauth+basic-auth-client-credentials
branch
from
May 7, 2024 18:00
420c3cb
to
0c1e1ab
Compare
… 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).
…able 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.
… Encode of Client ID
pietrygamat
force-pushed
the
feature/inherit-oauth+basic-auth-client-credentials
branch
from
May 7, 2024 18:03
0c1e1ab
to
edd0088
Compare
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR builds on top of both #2077 and #2164 . It enhances the timeline to show the details of both OAuth2 token request and user defined request.
This is done because:
When token request is executed, both requests are logged:
When using cached credentials (previously obtained access_token), only user request is shown:
Also, fixes #1933