-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Josh Wilson
committed
Jan 23, 2019
1 parent
5ddbf62
commit 9999a47
Showing
8 changed files
with
352 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,49 @@ | ||
language: python | ||
python: | ||
- "2.6" | ||
- "2.7" | ||
- "3.3" | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
|
||
matrix: | ||
include: | ||
- python: 2.6 | ||
env: | ||
- WITH_JWT=false | ||
WITH_HAWK=true | ||
- python: 2.7 | ||
env: | ||
- WITH_JWT=true | ||
WITH_HAWK=true | ||
- python: 3.3 | ||
env: | ||
- WITH_JWT=false | ||
WITH_HAWK=false | ||
SETUPTOOLS="setuptools<40.0.0" | ||
- python: 3.4 | ||
env: | ||
- WITH_JWT=true | ||
WITH_HAWK=true | ||
- python: 3.5 | ||
env: | ||
- WITH_JWT=true | ||
WITH_HAWK=true | ||
- python: 3.6 | ||
env: | ||
- WITH_JWT=true | ||
WITH_HAWK=true | ||
- python: 3.7 | ||
dist: xenial | ||
env: | ||
- WITH_JWT=true | ||
WITH_HAWK=true | ||
|
||
before_install: | ||
- pip install --upgrade pytest | ||
|
||
install: "pip install -r requirements-dev.txt" | ||
install: | ||
- "[[ -n \"$SETUPTOOLS\" ]] && pip install \"$SETUPTOOLS\" || true" | ||
- "pip install -r requirements-dev.txt" | ||
- "\"$WITH_JWT\" && pip install \"pyjwt>=1.7.0,<2.0.0\" || true" | ||
- "\"$WITH_HAWK\" && pip install \"mohawk>=1.0.0,<2.0.0\" || true" | ||
|
||
script: py.test --cov-report term-missing --cov=falcon_auth | ||
script: | ||
- py.test --cov-report term-missing --cov=falcon_auth | ||
|
||
after_success: | ||
- coveralls | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.