Skip to content

Commit 7771a2b

Browse files
authored
Update guard_authentication.rst
1 parent cc22936 commit 7771a2b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

security/guard_authentication.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Finally, configure your ``firewalls`` key in ``security.yaml`` to use this authe
241241
'logout' => true,
242242
'guard' => [
243243
'authenticators' => [
244-
TokenAuthenticator::class
244+
TokenAuthenticator::class,
245245
],
246246
],
247247
// ...
@@ -300,7 +300,7 @@ Each authenticator needs the following methods:
300300
(or throw an :ref:`AuthenticationException <guard-customize-error>`),
301301
authentication will fail.
302302

303-
**onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey)**
303+
**onAuthenticationSuccess(Request $request, TokenInterface $token, string $providerKey)**
304304
This is called after successful authentication and your job is to either
305305
return a :class:`Symfony\\Component\\HttpFoundation\\Response` object
306306
that will be sent to the client or ``null`` to continue the request
@@ -321,7 +321,7 @@ Each authenticator needs the following methods:
321321
the user authenticate (e.g. a 401 response that says "token is missing!").
322322

323323
**supportsRememberMe()**
324-
If you want to support "remember me" functionality, return true from this method.
324+
If you want to support "remember me" functionality, return ``true`` from this method.
325325
You will still need to activate ``remember_me`` under your firewall for it to work.
326326
Since this is a stateless API, you do not want to support "remember me"
327327
functionality in this example.
@@ -330,7 +330,7 @@ Each authenticator needs the following methods:
330330
If you are implementing the :class:`Symfony\\Component\\Security\\Guard\\AuthenticatorInterface`
331331
instead of extending the :class:`Symfony\\Component\\Security\\Guard\\AbstractGuardAuthenticator`
332332
class, you have to implement this method. It will be called
333-
after a successful authentication to create and return the token
333+
after a successful authentication to create and return the token (a class implementing :class:`Symfony\\Component\\Security\\Guard\\Token\\GuardTokenInterface`)
334334
for the user, who was supplied as the first argument.
335335

336336
The picture below shows how Symfony calls Guard Authenticator methods:

0 commit comments

Comments
 (0)