-
Notifications
You must be signed in to change notification settings - Fork 58
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
Also support Authorization:Bearer
header to specify access token
#1720
base: master
Are you sure you want to change the base?
Conversation
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.
Some initial comments. Mostly waiting for another PR to be merged, to avoid excessive conflicts.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1720 +/- ##
==========================================
+ Coverage 89.94% 89.97% +0.03%
==========================================
Files 395 395
Lines 37625 37656 +31
Branches 4229 4235 +6
==========================================
+ Hits 33840 33882 +42
+ Misses 2482 2478 -4
+ Partials 1303 1296 -7 ☔ View full report in Codecov by Sentry. |
Note: The suggestions is to use a raw string literal for a string with 3 |
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.
A first round of reviews.
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.
Also two very minor suggestions.
# Conflicts: # test/ServerTest.cpp
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.
1-1 with Julian, this looks great and works fine.
- Some minor comments
- It seems that "Bearer " is not correct
- We checked the RFC, and everything after the space after "Bearer" (or whatever the right word here is) already counts as the token, including further spaces
Authorization
headerAuthorization:
header to specify access token
@Qup42 Thanks a lot + please let me know when the minor comments are addressed, then I can merge this. NOTE: the |
For the HTTP
|
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.
Thank you very much
Authorization:
header to specify access tokenAuthorization:Bearer
header to specify access token
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.
This looks great now and is ready to merge, thanks a lot!
Conformance check passed ✅Test Status Changes 📊
|
Quality Gate passedIssues Measures |
The access token (for privileged functionality) could so far only be passed as a parameter (that is, either as a field in the data for
application/x-www-form-urlencoded
or as a query parameter). With this change, the access token is also read from theAuthorization
header, provided it exists and the value has the formBearer <access token>
. If the access token is specified both via theAuthorization
header and via theaccess-token
parameter, they must be the same. Resolves #1691.