From a47ed88cbe02311fff184f5d01b533ea67e9a452 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 17 May 2017 09:23:43 +0200 Subject: [PATCH] pass only strings to loadUserByUsername() --- security/guard_authentication.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/security/guard_authentication.rst b/security/guard_authentication.rst index beeb88e0d2a..ec83a98dd49 100644 --- a/security/guard_authentication.rst +++ b/security/guard_authentication.rst @@ -186,6 +186,10 @@ This requires you to implement six methods:: { $apiKey = $credentials['token']; + if (null === $apiKey) { + return; + } + // if null, authentication will fail // if a User object, checkCredentials() is called return $userProvider->loadUserByUsername($apiKey);