File tree Expand file tree Collapse file tree 3 files changed +30
-24
lines changed Expand file tree Collapse file tree 3 files changed +30
-24
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,31 @@ aiohttp_security
9
9
.. image :: https://img.shields.io/pypi/v/aiohttp-security.svg
10
10
:target: https://pypi.python.org/pypi/aiohttp-security
11
11
12
- The library provides identity and autorization for `aiohttp.web `__.
12
+ The library provides identity and authorization for `aiohttp.web `__.
13
13
14
14
.. _aiohttp_web : http://aiohttp.readthedocs.org/en/latest/web.html
15
15
16
16
__ aiohttp_web _
17
17
18
- Usage
19
- -----
20
- To install type ``pip install aiohttp_security ``.
21
- Launch ``make doc `` and see examples or look under **demo ** directory for a
22
- sample project.
18
+ Installation
19
+ ------------
20
+ Simplest case (authorization via cookies) ::
21
+
22
+ $ pip install aiohttp_security
23
+
24
+ With `aiohttp-session ` support ::
25
+
26
+ $ pip install aiohttp_security[session]
27
+
28
+ Examples
29
+ --------
30
+ Take a look at examples:
31
+
32
+ :ref: `aiohttp-security-example `
33
+
34
+ :ref: `aiohttp-security-example-db-auth `
35
+
36
+ and demos at **demo ** directory.
23
37
24
38
Documentation
25
39
-------------
Original file line number Diff line number Diff line change @@ -3,16 +3,9 @@ aiohttp_security
3
3
4
4
The library provides security for :ref: `aiohttp.web<aiohttp-web> `.
5
5
6
- Usage
7
- -----
8
6
9
-
10
- License
11
- -------
12
-
13
- ``aiohttp_security `` is offered under the Apache 2 license.
14
-
15
- Contents:
7
+ Contents
8
+ --------
16
9
17
10
.. toctree ::
18
11
:maxdepth: 2
@@ -23,7 +16,10 @@ Contents:
23
16
example_db_auth
24
17
glossary
25
18
19
+ License
20
+ -------
26
21
22
+ ``aiohttp_security `` is offered under the Apache 2 license.
27
23
28
24
Indices and tables
29
25
==================
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ First of all, what is *aiohttp_security* about?
13
13
14
14
It is a set of public API functions and standard for implementation details.
15
15
16
+
17
+ Public API
18
+ ==========
19
+
16
20
API is implementation agnostic, all client code should not call policy
17
21
code (see below) directly but use API only.
18
22
@@ -27,9 +31,6 @@ base classes for both concepts as well as several implementations
27
31
shipped with the library. End user is free to build own implemetations
28
32
if needed.
29
33
30
- Public API
31
- ==========
32
-
33
34
34
35
Authentication
35
36
==============
@@ -43,11 +44,6 @@ knowledge is there the user still registered in DB.
43
44
If :class: `aiohttp.web.Request ` has an :term: `identity ` it means the user has
44
45
some ID that should be checked by :term: `authorization ` policy.
45
46
46
-
47
-
48
-
49
-
50
-
51
- identity is a string shared between browser and server.
47
+ :term: `identity ` is a string shared between browser and server.
52
48
Thus it's not supposed to be database primary key, user login/email etc.
53
49
Random string like uuid or hash is better choice.
You can’t perform that action at this time.
0 commit comments