update REAMDE.rst with usage sample code
This commit is contained in:
@@ -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
|
||||
-------
|
||||
|
||||
Reference in New Issue
Block a user