[Security] Fix InsufficientAuthenticationException constructor calls

This commit is contained in:
Alexander 2012-07-15 15:37:14 +02:00
parent 79430b8238
commit 1147977212

View File

@ -106,7 +106,9 @@ class ExceptionListener
}
try {
$response = $this->startAuthentication($request, new InsufficientAuthenticationException('Full authentication is required to access this resource.', $token, 0, $exception));
$insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.', 0, $exception);
$insufficientAuthenticationException->setExtraInformation($token);
$response = $this->startAuthentication($request, $insufficientAuthenticationException);
} catch (\Exception $e) {
$event->setException($e);