[Security] reverted change from previous merge
This commit is contained in:
parent
cc03b73253
commit
5445b0d8b5
@ -31,6 +31,7 @@ class BasicAuthenticationListener implements ListenerInterface
|
|||||||
private $providerKey;
|
private $providerKey;
|
||||||
private $authenticationEntryPoint;
|
private $authenticationEntryPoint;
|
||||||
private $logger;
|
private $logger;
|
||||||
|
private $ignoreFailure;
|
||||||
|
|
||||||
public function __construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null)
|
public function __construct(SecurityContextInterface $securityContext, AuthenticationManagerInterface $authenticationManager, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null)
|
||||||
{
|
{
|
||||||
@ -43,6 +44,7 @@ class BasicAuthenticationListener implements ListenerInterface
|
|||||||
$this->providerKey = $providerKey;
|
$this->providerKey = $providerKey;
|
||||||
$this->authenticationEntryPoint = $authenticationEntryPoint;
|
$this->authenticationEntryPoint = $authenticationEntryPoint;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
|
$this->ignoreFailure = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,6 +80,10 @@ class BasicAuthenticationListener implements ListenerInterface
|
|||||||
$this->logger->info(sprintf('Authentication request failed for user "%s": %s', $username, $failed->getMessage()));
|
$this->logger->info(sprintf('Authentication request failed for user "%s": %s', $username, $failed->getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->ignoreFailure) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$event->setResponse($this->authenticationEntryPoint->start($request, $failed));
|
$event->setResponse($this->authenticationEntryPoint->start($request, $failed));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user