Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
3d55236
Merge branch 'develop'
gnarlychicken Feb 25, 2016
05b00d8
auth: Add setup function for auth middleware.
ilex Jan 9, 2017
0f80993
tests: Add Pytest tests for auth middleware.
ilex Jan 9, 2017
e3c749e
docs: Improve documentation in README.rst.
ilex Jan 9, 2017
6499569
tests: Reorganize pytest utils and fixtures.
ilex Jan 10, 2017
3667709
acl: Add setup function for acl middleware.
ilex Jan 10, 2017
a0261a4
tests: Add Pytest tests for acl middleware.
ilex Jan 10, 2017
dbd2cb7
tests: Add Pytest test for acl_required decorator.
ilex Jan 10, 2017
3d39cd8
acl: Fixed bug in acl_required decorator.
ilex Jan 10, 2017
45ea2b1
tests: Add some Pytest tests for acl.
ilex Jan 10, 2017
387c58e
docs: Change docs for acl middleware.
ilex Jan 10, 2017
6dbbb8b
Add setup function for aiohttp_auth.
ilex Jan 10, 2017
1dab09e
tests: Test to reproduce user_id_as_group bug.
ilex Jan 10, 2017
b8bb317
acl: Fix bug with user_id_as_group_name.
ilex Jan 10, 2017
ffc44a1
alc: Fix docs to reflect user_id_as_group bug.
ilex Jan 11, 2017
534a797
acl: Add AbstractACLGroupsCallback class.
ilex Jan 11, 2017
3aec9b9
docs: Add docs for AbstractACLGroupsCallback usage.
ilex Jan 11, 2017
79d3499
acl: Extract code into separate functions.
ilex Jan 18, 2017
2e8cf11
autz: Introduce universal authorization middleware.
ilex Jan 18, 2017
ef30d89
Change global aiohttp_auth setup function.
ilex Jan 18, 2017
2fbffe3
autz: Fix docs errors.
ilex Jan 19, 2017
125ea97
Improve docs in README.rst.
ilex Jan 19, 2017
5b5e110
tests: Add tox to run pytests.
ilex Jan 19, 2017
60c2ccf
Add some gitignore patterns.
ilex Jan 19, 2017
e130952
aiohttp_auth: Create new development version.
ilex Jan 19, 2017
67d52ff
docs: Improve README.rst docs.
ilex Jan 19, 2017
6c3fd68
autz: Fix misspelling in AbstractACLAutzPolicy class name.
ilex Jan 19, 2017
ec23e30
Move from aiohttp_auth to aiohttp_auth_autz.
ilex Feb 12, 2017
5b162d3
Add travis ci.
ilex Feb 12, 2017
5ec1738
auth_required decorator now raises HTTPUnauthorized.
ilex Feb 13, 2017
ebea100
Improve docstrings.
ilex Feb 14, 2017
c83bdbf
docs: Add documentation using Sphinx.
ilex Feb 14, 2017
8da6983
Merge branch 'feature/docs' into develop
ilex Feb 14, 2017
b4b5119
Add Manifest file.
ilex Feb 14, 2017
ac8b133
Bump version 0.2.0.rc0.
ilex Feb 14, 2017
c220f6a
Merge branch 'release/0.2.0rc0'
ilex Feb 14, 2017
ff661d5
Merge tag '0.2.0rc0' into develop
ilex Feb 14, 2017
516d784
docs: Improve docs.
ilex Feb 14, 2017
9bd279e
Bump release version 0.2.0.
ilex Feb 14, 2017
dc60756
Merge branch 'release/0.2.0'
ilex Feb 14, 2017
cb28074
Merge tag '0.2.0' into develop
ilex Feb 14, 2017
6f877e3
docs: Add python 3.5 env to build API docs with rtd.
ilex Feb 14, 2017
35732f6
Bump post release version 0.2.0.post0.
ilex Feb 14, 2017
c2a01f8
Merge branch 'hotfix/rtd_docs_py35'
ilex Feb 14, 2017
882262d
Merge tag 'rtd_docs_py35' into develop
ilex Feb 14, 2017
0a9def1
New development version 0.2.1.dev0.
ilex Feb 15, 2017
cf991b7
Explicitly set yarl version to 0.9.0.
ilex Feb 15, 2017
f74435c
autz: Simplify ACL policy.
ilex Feb 15, 2017
888e123
docs: Change docs to reflect acl policy changes.
ilex Feb 15, 2017
03bf99a
Merge branch 'feature/simplify_autz_acl' into develop
ilex Feb 15, 2017
e90b425
Remove yarl from requirements.
ilex Feb 16, 2017
06aeb4b
Add Makefile for routine.
ilex Feb 16, 2017
4514992
Improve make tasks.
ilex Feb 16, 2017
98a32b0
Bump release version 0.2.1.
ilex Feb 16, 2017
b4de030
Merge branch 'release/0.2.1'
ilex Feb 16, 2017
2175413
Merge tag '0.2.1' into develop
ilex Feb 16, 2017
762bf81
Move to aiohttp 2.x and add decorators support for aiohttp.web.View.
Apr 18, 2017
b1fb280
Improve docs.
Apr 18, 2017
0216264
Merge branch 'feature/view_decorator' into develop
Apr 18, 2017
899a882
Copy getting started to README.rst.
Apr 18, 2017
6d9ec9b
Bump release version 0.2.2.
Apr 18, 2017
6f7b55e
Merge branch 'release/0.2.2'
Apr 18, 2017
a062918
Merge tag '0.2.2' into develop
Apr 18, 2017
e6f925b
Fix lib missed for readthedocs docs build.
Sep 7, 2017
1c88c1d
Fix missed await in test
Mar 6, 2018
a5ba033
Fix tests to meet aiohttp 3.0
Mar 6, 2018
c8a2696
Merge branch 'feature/fix-tests' into develop
Mar 6, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
__pycache__
dist
build
.cache
.coverage
.tox
*.egg
*.eggs
*.egg-info
docs/_build
.python-version
.pytest_cache
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: python
python:
- "3.5"
- "3.6"

install:
- pip install --upgrade pip
- pip install -r requirements-dev.txt

script: py.test -v --cov-report=term-missing --cov=aiohttp_auth --cov=tests tests
61 changes: 61 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Changelog
=========

0.2.2 (2017-04-18)
------------------

- Move to ``aiohttp`` 2.x.

- Add support of middlewares decorators for ``aiohttp.web.View`` handlers.

- Add ``uvloop`` as IO loop for tests.

0.2.1 (2017-02-16)
------------------
- ``autz`` middleware:

- Simplify ``acl`` authorization policy by moving permit logic into ``policy.acl.AbstractACLAutzPolicy``.

- Remove ``policy.acl.AbstractACLContext`` class.

- Remove ``policy.acl.NaiveACLContext`` class.

- Remove ``policy.acl.ACLContext`` class.


0.2.0 (2017-02-14)
------------------

- ``acl`` middleware:

- Add ``setup`` function for ``acl`` middleware to install it in aiohttp fashion.

- Fix bug in ``acl_required`` decorator.

- Fix a possible security issue with ``acl`` groups. The issue is follow: the default behavior is
to add ``user_id`` to groups for authenticated users by the acl middleware, but if
``user_id`` is equal to some of acl groups that user suddenly has the permissions he is not
allowed for. So to avoid this kind of issue ``user_id`` is not added to groups any more.

- Introduce ``AbstractACLGroupsCallback`` class in ``acl`` middleware to make it possible easily create
callable object by inheriting from the abstract class and implementing ``acl_groups`` method. It
can be useful to store additional information (such database connection etc.) within such class.
An instance of this subclass can be used in place of ``acl_groups_callback`` parameter.

- ``auth`` middleware:

- Add ``setup`` function for ``auth`` middleware to install it in aiohttp fashion.

- ``auth.auth_required`` raised now a ``web.HTTPUnauthorized`` instead of a ``web.HTTPForbidden``.

- Introduce generic authorization middleware ``autz`` that performs authorization through the same
interface (``autz.permit`` coroutine and ``autz_required`` decorator) but using different policies.
Middleware has the ACL authorization as the built in policy which works in the same way as ``acl``
middleware. Users are free to add their own custom policies or to modify ACL one.

- Add global ``aiohttp_auth.setup`` function to install ``auth`` and ``autz`` middlewares at once
in aiohttp fashion.

- Add docs.

- Rewrite tests using ``pytest`` and ``pytest-aiohttp``.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include README.rst
include CHANGELOG.rst
include LICENSE
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
tox: clean test
install:
pip install -r requirements-dev.txt
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
rm -r -f *.egg-info
rm -r -f .cache
rm -r -f .eggs
rm -r -f .tox
rm -r -f build
rm -r -f dist
sdist: clean
python setup.py sdist
test:
rm -f .python-version
tox
pyenv local aiolibs
doc:
cd docs && make html
testpypi: clean
pip install wheel
python setup.py sdist bdist_wheel upload -r testpypi
pypi: clean
pip install wheel
python setup.py sdist bdist_wheel upload
Loading