diff options
| author | Michael Merickel <michael@merickel.org> | 2017-04-30 18:26:11 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-30 18:26:11 -0500 |
| commit | 80973f86368ee9bc8f7d8c87d32207cec83d9310 (patch) | |
| tree | abf20accdb77f6127a5480bf023231c7b0b6706b /docs/api | |
| parent | 87af11c5e33b8c03d57a8b571f0b152efe866af1 (diff) | |
| parent | 9c15a8eac2848cc7a81f174ecf7a6c63be323f51 (diff) | |
| download | pyramid-80973f86368ee9bc8f7d8c87d32207cec83d9310.tar.gz pyramid-80973f86368ee9bc8f7d8c87d32207cec83d9310.tar.bz2 pyramid-80973f86368ee9bc8f7d8c87d32207cec83d9310.zip | |
Merge pull request #3019 from mmerickel/fixes/csrf-decoupling-2854
Decouple CSRF protection from the session machinery (replaced #2854)
Diffstat (limited to 'docs/api')
| -rw-r--r-- | docs/api/config.rst | 1 | ||||
| -rw-r--r-- | docs/api/csrf.rst | 23 | ||||
| -rw-r--r-- | docs/api/interfaces.rst | 3 | ||||
| -rw-r--r-- | docs/api/session.rst | 4 |
4 files changed, 27 insertions, 4 deletions
diff --git a/docs/api/config.rst b/docs/api/config.rst index c76d3d5ff..a785b64ad 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -37,6 +37,7 @@ .. automethod:: set_authentication_policy .. automethod:: set_authorization_policy .. automethod:: set_default_csrf_options + .. automethod:: set_csrf_storage_policy .. automethod:: set_default_permission .. automethod:: add_permission diff --git a/docs/api/csrf.rst b/docs/api/csrf.rst new file mode 100644 index 000000000..38501546e --- /dev/null +++ b/docs/api/csrf.rst @@ -0,0 +1,23 @@ +.. _csrf_module: + +:mod:`pyramid.csrf` +------------------- + +.. automodule:: pyramid.csrf + + .. autoclass:: LegacySessionCSRFStoragePolicy + :members: + + .. autoclass:: SessionCSRFStoragePolicy + :members: + + .. autoclass:: CookieCSRFStoragePolicy + :members: + + .. autofunction:: get_csrf_token + + .. autofunction:: new_csrf_token + + .. autofunction:: check_csrf_origin + + .. autofunction:: check_csrf_token diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst index a212ba7a9..e542a6be0 100644 --- a/docs/api/interfaces.rst +++ b/docs/api/interfaces.rst @@ -44,6 +44,9 @@ Other Interfaces .. autointerface:: IRoutePregenerator :members: + .. autointerface:: ICSRFStoragePolicy + :members: + .. autointerface:: ISession :members: diff --git a/docs/api/session.rst b/docs/api/session.rst index 56c4f52d7..53bae7c52 100644 --- a/docs/api/session.rst +++ b/docs/api/session.rst @@ -9,10 +9,6 @@ .. autofunction:: signed_deserialize - .. autofunction:: check_csrf_origin - - .. autofunction:: check_csrf_token - .. autofunction:: SignedCookieSessionFactory .. autofunction:: UnencryptedCookieSessionFactoryConfig |
