Skip to content

Commit 9e6d008

Browse files
committed
minor #11025 Documented the logout CSRF options (javiereguiluz)
This PR was squashed before being merged into the 4.2 branch (closes #11025). Discussion ---------- Documented the logout CSRF options Fixes #8594. Commits ------- 6a4ebdb Documented the logout CSRF options
2 parents 7344b6c + 6a4ebdb commit 9e6d008

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

reference/configuration/security.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,31 @@ success_handler
181181
The service ID used for handling a successful logout. The service must implement
182182
:class:`Symfony\\Component\\Security\\Http\\Logout\\LogoutSuccessHandlerInterface`.
183183

184+
.. _reference-security-logout-csrf:
185+
186+
csrf_parameter
187+
~~~~~~~~~~~~~~
188+
189+
**type**: ``string`` **default**: ``'_csrf_token'``
190+
191+
The name of the parameter that stores the CSRF token value.
192+
193+
csrf_token_generator
194+
~~~~~~~~~~~~~~~~~~~~
195+
196+
**type**: ``string`` **default**: ``null``
197+
198+
The ``id`` of the service used to generate the CSRF tokens. Symfony provides a
199+
default service whose ID is ``security.csrf.token_manager``.
200+
201+
csrf_token_id
202+
~~~~~~~~~~~~~
203+
204+
**type**: ``string`` **default**: ``'logout'``
205+
206+
An arbitrary string used to generate the token value (and check its validity
207+
afterwards).
208+
184209
.. _reference-security-ldap:
185210

186211
LDAP functionality

security/csrf.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ CSRF Protection in Login Forms
121121
------------------------------
122122

123123
See :doc:`/security/form_login_setup` for a login form that is protected from
124-
CSRF attacks.
124+
CSRF attacks. You can also configure the
125+
:ref:`CSRF protection for the logout action <reference-security-logout-csrf>`.
125126

126127
.. _csrf-protection-in-html-forms:
127128

0 commit comments

Comments
 (0)