diff --git a/security/guard_authentication.rst b/security/guard_authentication.rst index 734a8c3efac..14159a25cc0 100644 --- a/security/guard_authentication.rst +++ b/security/guard_authentication.rst @@ -333,7 +333,7 @@ Finally, configure your ``firewalls`` key in ``security.yml`` to use this authen 'logout' => true, 'guard' => [ 'authenticators' => [ - TokenAuthenticator::class + TokenAuthenticator::class, ], ], // ... @@ -419,7 +419,7 @@ Each authenticator needs the following methods: the user authenticate (e.g. a 401 response that says "token is missing!"). **supportsRememberMe()** - If you want to support "remember me" functionality, return true from this method. + If you want to support "remember me" functionality, return ``true`` from this method. You will still need to activate ``remember_me`` under your firewall for it to work. Since this is a stateless API, you do not want to support "remember me" functionality in this example. @@ -428,7 +428,8 @@ Each authenticator needs the following methods: If you are implementing the :class:`Symfony\\Component\\Security\\Guard\\AuthenticatorInterface` instead of extending the :class:`Symfony\\Component\\Security\\Guard\\AbstractGuardAuthenticator` class, you have to implement this method. It will be called - after a successful authentication to create and return the token + after a successful authentication to create and return the token (a + class implementing :class:`Symfony\\Component\\Security\\Guard\\Token\\GuardTokenInterface`) for the user, who was supplied as the first argument. The picture below shows how Symfony calls Guard Authenticator methods: