From 996361c233d7d20ac0dcfc34b981c7aa158a5ea2 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Thu, 29 Oct 2015 15:34:38 +0200 Subject: [PATCH] Docs --- aiohttp_security/api.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/aiohttp_security/api.py b/aiohttp_security/api.py index 26cfdad..deff906 100644 --- a/aiohttp_security/api.py +++ b/aiohttp_security/api.py @@ -11,8 +11,10 @@ AUTZ_KEY = 'aiohttp_security_autz_policy' def remember(request, response, identity, **kwargs): """Remember identity into response. - The action is performed by indentity_policy.remember() - Usually the idenity is stored in user cookies homehow. + The action is performed by identity_policy.remember() + + Usually the idenity is stored in user cookies homehow but may be + pushed into custom header also. """ assert isinstance(identity, str), identity identity_policy = request.app.get(IDENTITY_KEY) @@ -28,6 +30,11 @@ def remember(request, response, identity, **kwargs): @asyncio.coroutine def forget(request, response): + """Drop current identity. + + Usually it clears cookie or server-side storage to forget user + session. + """ identity_policy = request.app.get(IDENTITY_KEY) if identity_policy is None: text = ("Security subsystem is not initialized, "