summaryrefslogtreecommitdiff
path: root/docs/api/csrf.rst
diff options
context:
space:
mode:
authorMatthew Wilkes <git@matthewwilkes.name>2016-12-05 12:16:26 +0100
committerMatthew Wilkes <git@matthewwilkes.name>2017-04-12 12:13:45 +0100
commita2c7c7a49bceeaaab2853e7e73c3671979d4c9ed (patch)
treebdc3640fad15bc3ea257df26399ff8aaaee14bd1 /docs/api/csrf.rst
parent387993115ee777784654c95d9f2f8d8ce7c4f5e4 (diff)
downloadpyramid-a2c7c7a49bceeaaab2853e7e73c3671979d4c9ed.tar.gz
pyramid-a2c7c7a49bceeaaab2853e7e73c3671979d4c9ed.tar.bz2
pyramid-a2c7c7a49bceeaaab2853e7e73c3671979d4c9ed.zip
Create a new ICSRF implementation for getting CSRF tokens, split out from the session machinery.
Adds configuration of this to the csrf_options configurator commands. Make the default implementation a fallback to the old one. Documentation patches for new best practices given updates CSRF implementation.
Diffstat (limited to 'docs/api/csrf.rst')
-rw-r--r--docs/api/csrf.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/api/csrf.rst b/docs/api/csrf.rst
new file mode 100644
index 000000000..3125bdac9
--- /dev/null
+++ b/docs/api/csrf.rst
@@ -0,0 +1,18 @@
+.. _csrf_module:
+
+:mod:`pyramid.csrf`
+-------------------
+
+.. automodule:: pyramid.csrf
+
+ .. autofunction:: get_csrf_token
+
+ .. autofunction:: new_csrf_token
+
+ .. autoclass:: SessionCSRF
+ :members:
+
+ .. autofunction:: check_csrf_origin
+
+ .. autofunction:: check_csrf_token
+