vertexcover-io / falcon-auth

A falcon middleware + authentication backends that adds authentication layer to you app/api service.
MIT License
103 stars 31 forks source link

Add Hawk authentication backend #13

Closed jcwilson closed 5 years ago

jcwilson commented 5 years ago

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 commented 5 years ago

Coverage Status

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

coveralls commented 5 years ago

Coverage Status

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

jcwilson commented 5 years ago

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 commented 5 years ago

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

jcwilson commented 5 years ago

This PR also contains the changes in #10, but in a way that also works for older versions of python.

kgritesh commented 5 years ago

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