Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 82542bc

Browse filesBrowse files
committed
minor #9842 Documented the logout_on_user_change option (javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes #9842). Discussion ---------- Documented the logout_on_user_change option This fixes #8428. @iltar I need your help here. In your PR (https://github.com/symfony/symfony/pull/23882/files) you said: ``` This config item will trigger a logout when the user has changed. ``` I need more precision about what this means: *"the user has changed"*. What exactly has changed? The token, the object that represents the user, some property of the user, etc. Thanks! Commits ------- 68664a5 Documented the logout_on_user_change option
2 parents c9aa1d2 + 68664a5 commit 82542bc
Copy full SHA for 82542bc

File tree

Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed

‎reference/configuration/security.rst

Copy file name to clipboardExpand all lines: reference/configuration/security.rst
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Each part will be explained in the next section.
141141
# See "Firewall Context" below for more details
142142
context: context_key
143143
stateless: false
144+
logout_on_user_change: false
144145
x509:
145146
provider: some_key_from_above
146147
remote_user:
@@ -450,6 +451,24 @@ The ``invalidate_session`` option allows to redefine this behavior. Set this
450451
option to ``false`` in every firewall and the user will only be logged out from
451452
the current firewall and not the other ones.
452453

454+
logout_on_user_change
455+
~~~~~~~~~~~~~~~~~~~~~
456+
457+
**type**: ``boolean`` **default**: ``false``
458+
459+
.. versionadded:: 3.4
460+
The ``logout_on_user_change`` option was introduced in Symfony 3.4.
461+
462+
If ``true`` this option makes Symfony to trigger a logout when the user has
463+
changed. Not doing that is deprecated, so this option should be set to ``true``
464+
to avoid getting deprecation messages.
465+
466+
The user is considered to have changed when the user class implements
467+
:class:`Symfony\\Component\\Security\\Core\\User\\EquatableInterface` and the
468+
``isEqualTo()`` method returns ``false``. Also, when any of the properties
469+
required by the :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface`
470+
(like the username, password or salt) changes.
471+
453472
.. _reference-security-ldap:
454473

455474
LDAP functionality

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.