Skip to content

Commit

Permalink
[Security] Make saving target_path extendible
Browse files Browse the repository at this point in the history
  • Loading branch information
helmer committed Sep 21, 2011
1 parent 774ac80 commit 022a9a7
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -157,11 +157,16 @@ private function startAuthentication(Request $request, AuthenticationException $
$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);
}
}

0 comments on commit 022a9a7

Please sign in to comment.