-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add Hawk authentication backend #13
Conversation
I can increase the coverage on the new code (and maybe on some of the older code, too), but I don't have the insight necessary yet to address the issues causing older versions of python to fail their tests. Is that something I could get some assistance with? |
Just checking to see if anyone could take a look at this. :) |
72c2b22
to
f6a1066
Compare
@@ -5,7 +5,7 @@ | |||
import sys | |||
from setuptools import setup | |||
|
|||
version = '1.1.0' | |||
version = '2.0.0' |
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.
Bumping the major version as moving pyjwt
to an optional dependency is a breaking change.
3fdc2f4
to
894088b
Compare
This PR also contains the changes in #10, but in a way that also works for older versions of python. |
This adds support for the [Hawk "Holder-Of-Key Authentication Scheme"](https://github.com/hueniverse/hawk`) backend. This also updates the `MultiAuthBackend` to collect any challenges from failed backends and provide them on the synthesized `HTTPUnauthorized` error if no backend succeeds in authenticating the request. The hawk library, and now the jwt library, are optional dependencies that must be specified in the client project's requirements as ["extras"](https://www.python.org/dev/peps/pep-0508/#extras). This ensures that clients only install the backend libraries necessary to their use case. This also cleans up some redundant specification of default values when raising `falcon.HTTPUnauthorized` exceptions from the backend code. Lastly, it adds testing support for 3.7 and adds classifier strings to setup.py
@jcwilson Thanks a lot for this extensive fix. Really appreciate it. |
This adds support for the Hawk "Holder-Of-Key Authentication Scheme" backend.
This also updates the
MultiAuthBackend
to collect any challenges from failedbackends and provide them on the synthesized
HTTPUnauthorized
error if nobackend succeeds in authenticating the request.
The hawk library, and now the jwt library, are optional dependencies that must be
specified in the client project's requirements as "extras". This ensures that clients
only install the backend libraries necessary to their use case.
This also cleans up some redundant specification of default values when raising
falcon.HTTPUnauthorized
exceptions from the backend code.Lastly, it adds testing support for 3.7 and adds classifier strings to
setup.py