Skip to content
Merged
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
10 changes: 10 additions & 0 deletions cookbook/security/_supportsToken.rst.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
After Symfony calls ``createToken()``, it will then call ``supportsToken()``
on your class (and any other authentication listeners) to figure out who should
handle the token. This is just a way to allow several authentication mechanisms
to be used for the same firewall (that way, you can for instance first try
to authenticate the user via a certificate or an API key and fall back to
a form login).

Mostly, you just need to make sure that this method returns ``true`` for a
token that has been created by ``createToken()``. Your logic should probably
look exactly like this example.
Loading