-
Notifications
You must be signed in to change notification settings - Fork 159
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
handle bearer token #4262
handle bearer token #4262
Conversation
c509b89
to
c6b52ed
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.
Since we now require Bearer
prefix too - we need to make sure api compare
and other tools that are parsing tokens from env or arguments prepend Bearer
, when the token is available.
Another solution would be just to specify a token already with a Bearer
prefix, but that's not very handy, because there is a space between the prefix and the actual token, so it'd require quotation marks and it potentially won't work for api compare
token:host
format.
It had already bitten me when I was testing a Write
permissioned endpoint. Even though we don't have any automated tests for those endpoints yet
.
I don't understand your point. The changes already work for |
Here's an example of
This will fail miserably, because |
And the |
My bad, I somehow managed to miss this change. |
Summary of changes
Changes introduced in this pull request:
Bearer
prefix. This is necessary, e.g., for theapi compare
to support sendingwrite
tokens to Lotus, see Go JSON-RPC authorization handling.Reference issue to close (if applicable)
Closes
Other information and links
Change checklist