@@ -295,18 +295,33 @@ accidentally block Symfony's dev tools - which live under URLs like ``/_profiler
295
295
and ``/_wdt ``.
296
296
297
297
All *real * URLs are handled by the ``main `` firewall (no ``pattern `` key means
298
- it matches *all * URLs). But this does *not * mean that every URL requires authentication.
299
- Nope, thanks to the ``anonymous `` key, this firewall *is * accessible anonymously.
298
+ it matches *all * URLs). A firewall can have many modes of authentication,
299
+ in other words many ways to ask the question "Who are you?". Often, the
300
+ user is unknown (i.e. not logged in) when they first visit your website. The
301
+ ``anonymous `` mode, if enabled, is used for these requests.
300
302
301
- In fact, if you go to the homepage right now, you *will * have access and you'll see
302
- that you're "authenticated" as ``anon. ``. Don't be fooled by the "Yes" next to
303
- Authenticated. The firewall verified that it does not know your identity, and so,
304
- you are anonymous:
303
+ In fact, if you go to the homepage right now, you *will * have access and you'll
304
+ see that you're "authenticated" as ``anon. ``. The firewall verified that it
305
+ does not know your identity, and so, you are anonymous:
305
306
306
307
.. image :: /_images/security/anonymous_wdt.png
307
308
:align: center
308
309
309
- You'll learn later how to deny access to certain URLs or controllers.
310
+ It means any request can have an anonymous token to access some resource,
311
+ while some actions (i.e. some pages or buttons) can still require specific
312
+ privileges. A user can then access a form login without being authenticated
313
+ as a unique user (otherwise an infinite redirection loop would happen
314
+ asking the user to authenticate while trying to doing so).
315
+
316
+ You'll learn later how to deny access to certain URLs, controllers, or part of
317
+ templates.
318
+
319
+ .. tip ::
320
+
321
+ The ``lazy `` anonymous mode prevents the session from being started if
322
+ there is no need for authorization (i.e. explicit check for a user
323
+ privilege). This is important to keep requests cacheable (see
324
+ :doc: `/http_cache `).
310
325
311
326
.. note ::
312
327
0 commit comments