-
Notifications
You must be signed in to change notification settings - Fork 474
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
[backend-comparison] Refresh access token and display authenticated user name #1483
Conversation
We need to refresh token to be able to renew an expired access token.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1483 +/- ##
==========================================
+ Coverage 85.75% 85.76% +0.01%
==========================================
Files 647 655 +8
Lines 72300 73251 +951
==========================================
+ Hits 61998 62823 +825
- Misses 10302 10428 +126 ☔ View full report in Codecov by Sentry. |
894b247
to
29c82ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
0156daf
to
c3b37e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes
2b9240b
to
c9a9def
Compare
@nathanielsimard ready for another round. |
3dbfc8b
to
5db22b0
Compare
The reqwest must have an explicit empty body otherwise the release build returns a 411 when refreshing the tokens without even calling the benchmark server endpoint.
Pull Request Template
Checklist
run-checks all
script has been executed.Related Issues/PRs
#1072
Changes
Add automatic refresh of access token. Now both the access token and the refresh token are cached. The refresh is done by the user benchmark server.
A new endpoint
/users/me
in the user benchmark server returns the anonymized user name so that we can display it when executingburnbench auth
.The
auth
command is now idempotent and can also refresh the access token so the CLI should now ask for the user's authorization only when strictly required.Testing
Tested with a local stack.