From cda5d3a3916591b5cddab8ae2985a43df9ec3597 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Mon, 23 Mar 2020 12:47:30 +0100 Subject: [PATCH] Update guard_authentication.rst Removing "This will be called on *every* request" from `getCredentials()`, since it's only called if `supports()` returns `true`. --- security/guard_authentication.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/security/guard_authentication.rst b/security/guard_authentication.rst index f87f74b1a37..371782cfaa4 100644 --- a/security/guard_authentication.rst +++ b/security/guard_authentication.rst @@ -370,7 +370,7 @@ The Guard Authenticator Methods Each authenticator needs the following methods: **supports(Request $request)** - This will be called on *every* request and your job is to decide if the + This is called on *every* request and your job is to decide if the authenticator should be used for this request (return ``true``) or if it should be skipped (return ``false``). @@ -381,9 +381,8 @@ Each authenticator needs the following methods: ``getCredentials()`` method. **getCredentials(Request $request)** - This will be called on *every* request and your job is to read the token (or - whatever your "authentication" information is) from the request and return it. - These credentials are later passed as the first argument of ``getUser()``. + Your job is to read the token (or whatever your "authentication" information is) + from the request and return it. These credentials are passed to ``getUser()``. **getUser($credentials, UserProviderInterface $userProvider)** The ``$credentials`` argument is the value returned by ``getCredentials()``.