[Security] Make saving target_path extendible
This commit is contained in:
parent
774ac80d18
commit
022a9a7a6e
@ -157,11 +157,16 @@ class ExceptionListener
|
|||||||
$this->logger->debug('Calling Authentication entry point');
|
$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
|
// session isn't required when using http basic authentication mechanism for example
|
||||||
if ($request->hasSession()) {
|
if ($request->hasSession()) {
|
||||||
$request->getSession()->set('_security.target_path', $request->getUri());
|
$request->getSession()->set('_security.target_path', $request->getUri());
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->authenticationEntryPoint->start($request, $authException);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user