@@ -412,11 +412,18 @@ Each authenticator needs the following methods:
412
412
:class: `Symfony\\ Component\\ HttpFoundation\\ Response ` object that helps
413
413
the user authenticate (e.g. a 401 response that says "token is missing!").
414
414
415
- **supportsRememberMe **
415
+ **supportsRememberMe() **
416
416
If you want to support "remember me" functionality, return true from this method.
417
417
You will still need to active ``remember_me `` under your firewall for it to work.
418
418
Since this is a stateless API, you do not want to support "remember me"
419
419
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.
420
427
421
428
.. _guard-customize-error :
422
429
@@ -552,7 +559,7 @@ Frequently Asked Questions
552
559
),
553
560
));
554
561
555
- **Can I use this with `` form_login`` ? **
562
+ **Can I use this with form_login? **
556
563
Yes! ``form_login `` is *one * way to authenticate a user, so you could use
557
564
it *and * then add one or more authenticators. Using a guard authenticator doesn't
558
565
collide with other ways to authenticate.
0 commit comments