Bearer authorization does not work #2
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Using bearer authorization as described in the readme fails to set the correct header. Adding the header manually through opts.headers works fine.
Looking at the code there are at least a couple of bugs:
The bearer token is read from opts.bearer, not opts.auth.bearer as described.
The header value includes a colon after "Bearer", this should not be there.
Good catch. Would you like to fork and give me a PR link?
Sorry, not comfortable sending a change when there are zero tests to help keep me from breaking things.
Are you just being self-righteous or are you serious?
I'm assuming that you must have a test case being that you came to this issue with the exact solution... and you're telling me that you're not comfortable removing the single character
:
and adding the missing sub-object?I have an easy way to test a released version, but I haven't even cloned the repo, never mind figuring out how to build and test locally. Sorry. Feel free to ignore the report if you like.
There is no build. It's a single file.
That said, I can make the change myself... I just haven't noticed or needed it because I use
opts.headers
for simple things likeBearer
tokens.I only kept the complex / silly options for the sake of compatibility.
Fixed in v1.5.0