diff options
author | Alexander <iam.asm89@gmail.com> | 2012-07-06 23:57:26 +0200 |
---|---|---|
committer | Alexander <iam.asm89@gmail.com> | 2012-07-08 19:59:10 +0200 |
commit | 2d2a52f3d7862a3bd270a03c921bfdc42e23c229 (patch) | |
tree | f35b4688f9a5ae90517b59d43f965fa1d3b79788 /Http/Authentication/DefaultAuthenticationSuccessHandler.php | |
parent | b13c20333403768a1905a43acad7fa2dc1772a25 (diff) | |
download | symfony-security-2d2a52f3d7862a3bd270a03c921bfdc42e23c229.zip symfony-security-2d2a52f3d7862a3bd270a03c921bfdc42e23c229.tar.gz symfony-security-2d2a52f3d7862a3bd270a03c921bfdc42e23c229.tar.bz2 |
[Security] Fix regression after rebase. Target url should be firewall dependent
Diffstat (limited to 'Http/Authentication/DefaultAuthenticationSuccessHandler.php')
-rw-r--r-- | Http/Authentication/DefaultAuthenticationSuccessHandler.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/Http/Authentication/DefaultAuthenticationSuccessHandler.php index 88dcf68..deb7d45 100644 --- a/Http/Authentication/DefaultAuthenticationSuccessHandler.php +++ b/Http/Authentication/DefaultAuthenticationSuccessHandler.php @@ -29,16 +29,19 @@ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandle { protected $httpUtils; protected $options; + protected $providerKey; /** * Constructor. * * @param HttpUtils $httpUtils + * @param string $providerKey * @param array $options Options for processing a successful authentication attempt. */ - public function __construct(HttpUtils $httpUtils, array $options) + public function __construct(HttpUtils $httpUtils, $providerKey, array $options) { - $this->httpUtils = $httpUtils; + $this->httpUtils = $httpUtils; + $this->providerKey = $providerKey; $this->options = array_merge(array( 'always_use_default_target_path' => false, @@ -75,8 +78,8 @@ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandle } $session = $request->getSession(); - if ($targetUrl = $session->get('_security.target_path')) { - $session->remove('_security.target_path'); + if ($targetUrl = $session->get('_security.'.$this->providerKey.'.target_path')) { + $session->remove('_security.'.$this->providerKey.'.target_path'); return $targetUrl; } |