summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthew Wilkes <git@matthewwilkes.name>2017-04-12 11:57:56 +0100
committerMatthew Wilkes <git@matthewwilkes.name>2017-04-12 12:14:12 +0100
commit7c0f098641fda4207ea6fa50c58b289926038697 (patch)
tree38f3b4178087a336c9cdd14a6a38e2729938573d /docs
parentf6d63a41d37b0647c49e53bb54f009f7da4d5079 (diff)
downloadpyramid-7c0f098641fda4207ea6fa50c58b289926038697.tar.gz
pyramid-7c0f098641fda4207ea6fa50c58b289926038697.tar.bz2
pyramid-7c0f098641fda4207ea6fa50c58b289926038697.zip
Use the webob CookieProfile in the Cookie implementation, rename some implemenations based on feedback, split CSRF implementation and option configuration and make the csrf token function exposed as a system default rather than a renderer event.
Diffstat (limited to 'docs')
-rw-r--r--docs/api/config.rst1
-rw-r--r--docs/api/csrf.rst4
-rw-r--r--docs/narr/extconfig.rst1
-rw-r--r--docs/narr/security.rst8
4 files changed, 8 insertions, 6 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
index 89fb0c4b2..f890ee660 100644
--- a/docs/api/csrf.rst
+++ b/docs/api/csrf.rst
@@ -5,10 +5,10 @@
.. automodule:: pyramid.csrf
- .. autoclass:: SessionCSRF
+ .. autoclass:: SessionCSRFStoragePolicy
:members:
- .. autoclass:: CookieCSRF
+ .. autoclass:: CookieCSRFStoragePolicy
:members:
.. autofunction:: get_csrf_token
diff --git a/docs/narr/extconfig.rst b/docs/narr/extconfig.rst
index 4009ec1dc..c20685cbf 100644
--- a/docs/narr/extconfig.rst
+++ b/docs/narr/extconfig.rst
@@ -263,6 +263,7 @@ Pre-defined Phases
- :meth:`pyramid.config.Configurator.override_asset`
- :meth:`pyramid.config.Configurator.set_authorization_policy`
- :meth:`pyramid.config.Configurator.set_default_csrf_options`
+- :meth:`pyramid.config.Configurator.set_csrf_storage_policy`
- :meth:`pyramid.config.Configurator.set_default_permission`
- :meth:`pyramid.config.Configurator.set_view_mapper`
diff --git a/docs/narr/security.rst b/docs/narr/security.rst
index 04c236e0b..e67f7b98c 100644
--- a/docs/narr/security.rst
+++ b/docs/narr/security.rst
@@ -780,15 +780,15 @@ and then requiring that it be present in all potentially unsafe requests.
:app:`Pyramid` provides facilities to create and check CSRF tokens.
By default :app:`Pyramid` comes with a session-based CSRF implementation
-:class:`pyramid.csrf.SessionCSRF`. To use it, you must first enable
+:class:`pyramid.csrf.SessionCSRFStoragePolicy`. To use it, you must first enable
a :term:`session factory` as described in
:ref:`using_the_default_session_factory` or
:ref:`using_alternate_session_factories`. Alternatively, you can use
-a cookie-based implementation :class:`pyramid.csrf.CookieCSRF` which gives
+a cookie-based implementation :class:`pyramid.csrf.CookieCSRFStoragePolicy` which gives
some additional flexibility as it does not require a session for each user.
You can also define your own implementation of
:class:`pyramid.interfaces.ICSRFStoragePolicy` and register it with the
-:meth:`pyramid.config.Configurator.set_default_csrf_options` directive.
+:meth:`pyramid.config.Configurator.set_csrf_storage_policy` directive.
For example:
@@ -797,7 +797,7 @@ For example:
from pyramid.config import Configurator
config = Configurator()
- config.set_default_csrf_options(implementation=MyCustomCSRFPolicy())
+ config.set_csrf_storage_policy(MyCustomCSRFPolicy())
.. index::
single: csrf.get_csrf_token