Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8b3528f

Browse filesBrowse files
committed
minor #12856 Update guard_authentication.rst (atailouloute)
This PR was merged into the 5.0 branch. Discussion ---------- Update guard_authentication.rst Minor improvements Commits ------- 7771a2b Update guard_authentication.rst
2 parents d9eae70 + 7771a2b commit 8b3528f
Copy full SHA for 8b3528f

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎security/guard_authentication.rst

Copy file name to clipboardExpand all lines: security/guard_authentication.rst
+4-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.