2015-07-08 17:30:24 +00:00
|
|
|
aiohttp_security
|
|
|
|
================
|
|
|
|
|
|
|
|
The library provides identity and autorization for `aiohttp.web`__.
|
|
|
|
|
|
|
|
.. _aiohttp_web: http://aiohttp.readthedocs.org/en/latest/web.html
|
|
|
|
|
|
|
|
__ aiohttp_web_
|
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
2016-05-13 01:59:22 +00:00
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
from aiohttp_security import authorize
|
|
|
|
|
|
|
|
@authorize(required=True, redirect_url='/login', permission='admin')
|
|
|
|
async def index(request, identity=None):
|
|
|
|
return web.Response(body=b'OK')
|
2015-07-08 17:30:24 +00:00
|
|
|
|
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
|
|
|
``aiohttp_security`` is offered under the Apache 2 license.
|