From f38f9915baed2be514b2329953c5cabb8b8eda9e Mon Sep 17 00:00:00 2001 From: Fabien Zet Date: Tue, 29 Jul 2014 15:41:00 +0700 Subject: [PATCH 1/2] Add return authenticatedToken Add return authenticatedToken if userProvider !instanceof ChainUserProvider --- .../Security/Authentication/Provider/ApiKeyProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Uecode/Bundle/ApiKeyBundle/Security/Authentication/Provider/ApiKeyProvider.php b/src/Uecode/Bundle/ApiKeyBundle/Security/Authentication/Provider/ApiKeyProvider.php index 06ba5a4..8f29d6c 100644 --- a/src/Uecode/Bundle/ApiKeyBundle/Security/Authentication/Provider/ApiKeyProvider.php +++ b/src/Uecode/Bundle/ApiKeyBundle/Security/Authentication/Provider/ApiKeyProvider.php @@ -44,7 +44,10 @@ public function authenticate(TokenInterface $token) } } } else { - $this->doAuth($this->userProvider, $token); + $result = $this->doAuth($this->userProvider, $token); + if($result !== false) { + return $result; + } } } From c02a9fe81753568c2f77cfe53d5be1009666cee2 Mon Sep 17 00:00:00 2001 From: Fabien Zet Date: Wed, 6 Aug 2014 09:19:33 +0700 Subject: [PATCH 2/2] Fix if condition follow psr --- .../Security/Authentication/Provider/ApiKeyProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Uecode/Bundle/ApiKeyBundle/Security/Authentication/Provider/ApiKeyProvider.php b/src/Uecode/Bundle/ApiKeyBundle/Security/Authentication/Provider/ApiKeyProvider.php index 8f29d6c..cfb7257 100644 --- a/src/Uecode/Bundle/ApiKeyBundle/Security/Authentication/Provider/ApiKeyProvider.php +++ b/src/Uecode/Bundle/ApiKeyBundle/Security/Authentication/Provider/ApiKeyProvider.php @@ -45,7 +45,7 @@ public function authenticate(TokenInterface $token) } } else { $result = $this->doAuth($this->userProvider, $token); - if($result !== false) { + if ($result !== false) { return $result; } }