[Security] Make saving target_path extendible

This commit is contained in:
Helmer Aaviksoo 2011-09-21 11:57:40 +03:00
parent 774ac80d18
commit 022a9a7a6e

View File

@ -157,11 +157,16 @@ class ExceptionListener
$this->logger->debug('Calling Authentication entry point');
}
$this->setTargetPath($request);
return $this->authenticationEntryPoint->start($request, $authException);
}
protected function setTargetPath(Request $request)
{
// session isn't required when using http basic authentication mechanism for example
if ($request->hasSession()) {
$request->getSession()->set('_security.target_path', $request->getUri());
}
return $this->authenticationEntryPoint->start($request, $authException);
}
}