Skip to content
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

Merged
merged 1 commit into from
Jan 27, 2019
Merged

Conversation

jcwilson
Copy link
Collaborator

@jcwilson jcwilson commented Jan 10, 2019

This adds support for the Hawk "Holder-Of-Key Authentication Scheme" 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". 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

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.3%) to 84.234% when pulling 9e9d38b on jcwilson:master into 5ddbf62 on loanzen:master.

@coveralls
Copy link

coveralls commented Jan 10, 2019

Coverage Status

Coverage decreased (-46.5%) to 40.952% when pulling 9999a47 on jcwilson:master into 5ddbf62 on loanzen:master.

@jcwilson
Copy link
Collaborator Author

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?

@jcwilson
Copy link
Collaborator Author

Just checking to see if anyone could take a look at this. :)

@jcwilson jcwilson force-pushed the master branch 18 times, most recently from 72c2b22 to f6a1066 Compare January 19, 2019 12:29
@@ -5,7 +5,7 @@
import sys
from setuptools import setup

version = '1.1.0'
version = '2.0.0'
Copy link
Collaborator Author

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.

@jcwilson jcwilson force-pushed the master branch 5 times, most recently from 3fdc2f4 to 894088b Compare January 19, 2019 17:41
@jcwilson
Copy link
Collaborator Author

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
@kgritesh
Copy link
Contributor

@jcwilson Thanks a lot for this extensive fix. Really appreciate it.

@kgritesh kgritesh merged commit 46b45fb into vertexcover-io:master Jan 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants