8000 pass only strings to loadUserByUsername() · symfony/symfony-docs@a47ed88 · GitHub
[go: up one dir, main page]

Skip to content

Commit a47ed88

Browse files
committed
pass only strings to loadUserByUsername()
1 parent 8194fb2 commit a47ed88

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