Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWWW-Authenticate response adds wrong format with comma #676
Comments
|
So basically it means that the preferred approach would be to add the |
Yes, a challenge must be added. It would be nice if challenge is
configurable and has hooks, for composing challenges and verifying them.
|
Describe the bug
Since 3.0.0 oauthlib returns 401 with WWW-Authenticate HTTP header. The field is currently not defining the
realm=
option, but it looks OK for the Bearer Token RFC. However, I didn't find any concrete examples of syntax when realm is not present, and if we have to add a comma or not.Example it's either:
WWW-Authenticate: Bearer, error=access_denied, error_description=foobar
or
WWW-Authenticate: Bearer error=access_denied, error_description=foobar
In 3.0.x, we are sending the former WITH the comma after
Bearer
.How to reproduce
Execute
raise errors.InvalidTokenError()
in your RequestValidator.Expected behavior
I saw a couple of providers which are sending a comma after the
Bearer
keyword. I think we must do the same.Additional context
Please provide any further context here.
bottle-oauthlib
declaring a OAuth2 ResourceServer