8000 minor #7912 pass only strings to loadUserByUsername() (xabbuh) · symfony/symfony-docs@81b8dcf · GitHub
[go: up one dir, main page]

Skip to content

Commit 81b8dcf

Browse files
committed
minor #7912 pass only strings to loadUserByUsername() (xabbuh)
This PR was merged into the 2.8 branch. Discussion ---------- pass only strings to loadUserByUsername() This completes #7065 as since the change made there the `token` key can refer to `null`. Commits ------- a47ed88 pass only strings to loadUserByUsername()
2 parents 8194fb2 + a47ed88 commit 81b8dcf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

security/guard_authentication.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ This requires you to implement six methods::
186186
{
187187
$apiKey = $credentials['token'];
188188

189+
if (null === $apiKey) {
190+
return;
191+
}
192+
189193
// if null, authentication will fail
190194
// if a User object, checkCredentials() is called
191195
return $userProvider->loadUserByUsername($apiKey);

0 commit comments

Comments
 (0)
0