diff options
4 files changed, 9 insertions, 5 deletions
diff --git a/Core/Authentication/AuthenticationProviderManager.php b/Core/Authentication/AuthenticationProviderManager.php index 1d85e87..a82b9fb 100644 --- a/Core/Authentication/AuthenticationProviderManager.php +++ b/Core/Authentication/AuthenticationProviderManager.php @@ -59,6 +59,10 @@ class AuthenticationProviderManager implements AuthenticationManagerInterface try { $result = $provider->authenticate($token); + + if (null !== $result) { + break; + } } catch (AccountStatusException $e) { $e->setExtraInformation($token); diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php index d045b7b..506d49e 100644 --- a/Http/Firewall/AbstractAuthenticationListener.php +++ b/Http/Firewall/AbstractAuthenticationListener.php @@ -105,9 +105,9 @@ abstract class AbstractAuthenticationListener implements ListenerInterface /** * Handles form based authentication. * - * @param Event $event An Event instance + * @param GetResponseEvent $event A GetResponseEvent instance */ - public function onCoreSecurity(GetResponseEvent $event) + public final function onCoreSecurity(GetResponseEvent $event) { $request = $event->getRequest(); diff --git a/Http/Firewall/AbstractPreAuthenticatedListener.php b/Http/Firewall/AbstractPreAuthenticatedListener.php index c5baa18..49039cd 100644 --- a/Http/Firewall/AbstractPreAuthenticatedListener.php +++ b/Http/Firewall/AbstractPreAuthenticatedListener.php @@ -52,7 +52,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface * * @param GetResponseEvent $event A GetResponseEvent instance */ - public function onCoreSecurity(GetResponseEvent $event) + public final function onCoreSecurity(GetResponseEvent $event) { $request = $event->getRequest(); diff --git a/Http/Firewall/X509AuthenticationListener.php b/Http/Firewall/X509AuthenticationListener.php index 831ca02..2f4b78a 100644 --- a/Http/Firewall/X509AuthenticationListener.php +++ b/Http/Firewall/X509AuthenticationListener.php @@ -25,8 +25,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; */ class X509AuthenticationListener extends AbstractPreAuthenticatedListener { - protected $userKey; - protected $credentialKey; + private $userKey; + private $credentialKey; public function __construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager, $providerKey, $userKey = 'SSL_CLIENT_S_DN_Email', $credentialKey = 'SSL_CLIENT_S_DN', LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null) { |