Skip to content

Commit 7186d17

Browse files
committed
minor #5943 Add tip for when returning null from createToken() (jeroenseegers)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #5943). Discussion ---------- Add tip for when returning `null` from `createToken()` | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #5264 Commits ------- 1337b31 Add caution when returning null from createToken()
2 parents 4ee6cb2 + 1337b31 commit 7186d17

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cookbook/security/api_key_authentication.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ will cause authentication to fail. You might want to return ``null`` instead
109109
to just skip the authentication, so Symfony can fallback to another authentication
110110
method, if any.
111111

112+
.. caution::
113+
114+
In case you return ``null`` from your ``createToken()`` method, be sure to enable
115+
``anonymous`` in you firewall. This way you'll be able to get an ``AnonymousToken``.
116+
112117
2. supportsToken
113118
~~~~~~~~~~~~~~~~
114119

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy