Update doc

This commit is contained in:
Andrew Svetlov 2015-09-06 07:12:18 +02:00
parent d7f6c8a48a
commit 4ed19b2bb0
3 changed files with 32 additions and 9 deletions

View File

@ -55,9 +55,9 @@ def permits(request, permission, context=None):
return access return access
def setup(app, identity_policy, auth_policy): def setup(app, identity_policy, autz_policy):
assert isinstance(identity_policy, AbstractIdentityPolicy), identity_policy assert isinstance(identity_policy, AbstractIdentityPolicy), identity_policy
assert isinstance(auth_policy, AbstractAuthorizationPolicy), auth_policy assert isinstance(autz_policy, AbstractAuthorizationPolicy), autz_policy
app[IDENTITY_KEY] = identity_policy app[IDENTITY_KEY] = identity_policy
app[AUTZ_KEY] = auth_policy app[AUTZ_KEY] = autz_policy

View File

@ -9,8 +9,18 @@
.. glossary:: .. glossary::
session aiohttp
A namespace that is valid for some period of continual activity :term:`asyncio` based library for making web servers.
that can be used to represent a user's interaction with a web
application.
asyncio
The library for writing single-threaded concurrent code using
coroutines, multiplexing I/O access over sockets and other
resources, running network clients and servers, and other
related primitives.
Reference implementation of :pep:`3156`
https://pypi.python.org/pypi/asyncio/

View File

@ -10,7 +10,20 @@
.. highlight:: python .. highlight:: python
Public functions Public API functions
================ ====================
.. coroutine:: remember(request, response, identity, **kwargs)
Remember identity
.. function:: setup(app, identity_policy, autz_policy)
Setup :mod:`aiohttp` application with security policies.
Abstract policies
=================