More docs

This commit is contained in:
Andrew Svetlov
2015-10-29 10:31:24 +02:00
parent 4ed19b2bb0
commit a0f73c85eb
3 changed files with 31 additions and 1 deletions

View File

@@ -9,6 +9,12 @@ AUTZ_KEY = 'aiohttp_security_autz_policy'
@asyncio.coroutine
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.
"""
assert isinstance(identity, str), identity
identity_policy = request.app.get(IDENTITY_KEY)
if identity_policy is None:
text = ("Security subsystem is not initialized, "