Skip to content

Commit 34e6e6e

Browse files
committed
Merge pull request #56 from davidfuhr/security-doc
[Doc] Add doc for csrf_token modifier
2 parents b23833d + 2ae1e2c commit 34e6e6e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Resources/doc/extensions.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,15 @@ that method is invented for this example).
191191

192192
For more details on expressions and security, see the section `Complex Access Controls with Expressions <http://symfony.com/doc/current/book/security.html#book-security-expressions>`_ in the Symfony book.
193193

194+
Using CSRF Protection in the Login Form
195+
---------------------------------------
196+
197+
The security extension also adds a modifer to support CSRF Protection in login forms. Please read `Using CSRF Protection in the Login Form <http://symfony.com/doc/current/cookbook/security/csrf_in_login_form.html>`_ from the Symfony Documentation for general CSRF Protection setup. The template for rendering should look like this:
198+
199+
.. code-block:: html+smarty
200+
201+
<input type="hidden" name="_csrf_token" value="{'authenticate'|csrf_token}">
202+
194203
Enabling custom Extensions
195204
==========================
196205

0 commit comments

Comments
 (0)