Skip to content

Commit f8e201f

Browse files
Daniel Wernerpowerdan
Daniel Werner
authored andcommitted
Update guard_authentication.rst
1 parent 1c962a6 commit f8e201f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

security/guard_authentication.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,18 @@ Each authenticator needs the following methods:
412412
:class:`Symfony\\Component\\HttpFoundation\\Response` object that helps
413413
the user authenticate (e.g. a 401 response that says "token is missing!").
414414

415-
**supportsRememberMe**
415+
**supportsRememberMe()**
416416
If you want to support "remember me" functionality, return true from this method.
417417
You will still need to active ``remember_me`` under your firewall for it to work.
418418
Since this is a stateless API, you do not want to support "remember me"
419419
functionality in this example.
420+
421+
**createAuthenticatedToken(UserInterface $user, string $providerKey)**
422+
If you are implementing the :class:`Symfony\\Component\\Security\\Guard\\GuardAuthenticatorInterface`
423+
Method instead of extending the :class:`Symfony\\Component\\Security\\Guard\\AbstractGuardAuthenticator`,
424+
you have to implement this method. This method will be called
425+
after a successful authentication to create and return the token
426+
for the user, which was supplied as the first argument.
420427

421428
.. _guard-customize-error:
422429

@@ -552,7 +559,7 @@ Frequently Asked Questions
552559
),
553560
));
554561
555-
**Can I use this with ``form_login``?**
562+
**Can I use this with form_login?**
556563
Yes! ``form_login`` is *one* way to authenticate a user, so you could use
557564
it *and* then add one or more authenticators. Using a guard authenticator doesn't
558565
collide with other ways to authenticate.

0 commit comments

Comments
 (0)