From 0f8ed649b7119e56be99c33c0aded26f5cb0f95b Mon Sep 17 00:00:00 2001 From: Valerij Ivashchenko Date: Thu, 19 Oct 2017 22:59:19 +0300 Subject: [PATCH] Update ApiKeyListener.php Not set response if not found api key, because the same route can have multiple firewalls/listeners (for example when allow anonymous access to resources under firewall). --- .../Bundle/ApiKeyBundle/Security/Firewall/ApiKeyListener.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Uecode/Bundle/ApiKeyBundle/Security/Firewall/ApiKeyListener.php b/src/Uecode/Bundle/ApiKeyBundle/Security/Firewall/ApiKeyListener.php index a684376..89ba56c 100644 --- a/src/Uecode/Bundle/ApiKeyBundle/Security/Firewall/ApiKeyListener.php +++ b/src/Uecode/Bundle/ApiKeyBundle/Security/Firewall/ApiKeyListener.php @@ -48,9 +48,6 @@ public function handle(GetResponseEvent $event) $request = $event->getRequest(); if (!$this->keyExtractor->hasKey($request)) { - $response = new Response(); - $response->setStatusCode(401); - $event->setResponse($response); return ; }