Skip to content

Commit 2617d5f

Browse files
committed
minor #13414 Adding anonymous (ThomasLandauer)
This PR was squashed before being merged into the 4.4 branch (closes #13414). Discussion ---------- Adding `anonymous` I'm not sure about `~` being the default - please double-check. The info is taken from https://symfony.com/blog/new-in-symfony-4-4-lazy-firewalls Commits ------- a534123 Adding `anonymous`
2 parents 864be0a + a534123 commit 2617d5f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

reference/configuration/security.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Configuration
2929

3030
* `access_denied_url`_
3131
* `always_authenticate_before_granting`_
32+
* `anonymous`_
3233
* `erase_credentials`_
3334
* `hide_user_not_found`_
3435
* `session_fixation_strategy`_
@@ -61,6 +62,19 @@ If ``true``, the user is asked to authenticate before each call to the
6162
``isGranted()`` method in services and controllers or ``is_granted()`` from
6263
templates.
6364

65+
anonymous
66+
~~~~~~~~~
67+
68+
**type**: ``string`` **default**: ``~``
69+
70+
When set to ``lazy``, Symfony loads the user (and starts the session) only if the
71+
application actually accesses the ``User`` object (e.g. via a ``is_granted()`` call
72+
in a template or ``isGranted()`` in a controller or service.
73+
74+
.. versionadded:: 4.4
75+
76+
The option ``lazy`` was introduced in Symfony 4.4.
77+
6478
erase_credentials
6579
~~~~~~~~~~~~~~~~~
6680

@@ -554,7 +568,7 @@ logout_on_user_change
554568
The ``logout_on_user_change`` option was deprecated in Symfony 4.1.
555569

556570
If ``false`` this option makes Symfony to not trigger a logout when the user has
557-
changed. Doing that is deprecated, so this option should set to ``true`` or
571+
changed. Doing that is deprecated, so this option should be set to ``true`` or
558572
unset to avoid getting deprecation messages.
559573

560574
The user is considered to have changed when the user class implements

0 commit comments

Comments
 (0)