update REAMDE.rst with usage sample code
This commit is contained in:
parent
ffa1c08189
commit
7091350ff3
|
@ -10,6 +10,13 @@ __ aiohttp_web_
|
|||
Usage
|
||||
-----
|
||||
|
||||
.. 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')
|
||||
|
||||
License
|
||||
-------
|
||||
|
|
Loading…
Reference in New Issue