Skip to content

Documented the logout CSRF options #11025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions reference/configuration/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,31 @@ success_handler
The service ID used for handling a successful logout. The service must implement
:class:`Symfony\\Component\\Security\\Http\\Logout\\LogoutSuccessHandlerInterface`.

.. _reference-security-logout-csrf:

csrf_parameter
~~~~~~~~~~~~~~

**type**: ``string`` **default**: ``'_csrf_token'``

The name of the parameter that stores the CSRF token value.

csrf_token_generator
~~~~~~~~~~~~~~~~~~~~

**type**: ``string`` **default**: ``null``

The ``id`` of the service used to generate the CSRF tokens. Symfony provides a
default service whose ID is ``security.csrf.token_manager``.

csrf_token_id
~~~~~~~~~~~~~

**type**: ``string`` **default**: ``'logout'``

An arbitrary string used to generate the token value (and check its validity
afterwards).

.. _reference-security-ldap:

LDAP functionality
Expand Down
3 changes: 2 additions & 1 deletion security/csrf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ CSRF Protection in Login Forms
------------------------------

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

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

Expand Down