From 4ed19b2bb0da0b7a325a9b3c3d6d623978b75ffa Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Sun, 6 Sep 2015 07:12:18 +0200 Subject: [PATCH] Update doc --- aiohttp_security/api.py | 6 +++--- docs/glossary.rst | 18 ++++++++++++++---- docs/reference.rst | 17 +++++++++++++++-- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/aiohttp_security/api.py b/aiohttp_security/api.py index effe783..4ffea01 100644 --- a/aiohttp_security/api.py +++ b/aiohttp_security/api.py @@ -55,9 +55,9 @@ def permits(request, permission, context=None): 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(auth_policy, AbstractAuthorizationPolicy), auth_policy + assert isinstance(autz_policy, AbstractAuthorizationPolicy), autz_policy app[IDENTITY_KEY] = identity_policy - app[AUTZ_KEY] = auth_policy + app[AUTZ_KEY] = autz_policy diff --git a/docs/glossary.rst b/docs/glossary.rst index 0019f90..d1e91ca 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -9,8 +9,18 @@ .. glossary:: - session + aiohttp - A namespace that is valid for some period of continual activity - that can be used to represent a user's interaction with a web - application. + :term:`asyncio` based library for making web servers. + + + 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/ diff --git a/docs/reference.rst b/docs/reference.rst index 4e0cc7f..492b92c 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -10,7 +10,20 @@ .. 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 +=================