summaryrefslogtreecommitdiffstats
path: root/Http/Authentication
diff options
context:
space:
mode:
Diffstat (limited to 'Http/Authentication')
-rw-r--r--Http/Authentication/DefaultAuthenticationSuccessHandler.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/Http/Authentication/DefaultAuthenticationSuccessHandler.php b/Http/Authentication/DefaultAuthenticationSuccessHandler.php
index bfc0c8b..4cb4bb6 100644
--- a/Http/Authentication/DefaultAuthenticationSuccessHandler.php
+++ b/Http/Authentication/DefaultAuthenticationSuccessHandler.php
@@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\Authentication;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\Security\Http\Util\TargetPathTrait;
use Symfony\Component\Security\Http\HttpUtils;
use Symfony\Component\Security\Http\ParameterBagUtils;
@@ -25,6 +26,8 @@ use Symfony\Component\Security\Http\ParameterBagUtils;
*/
class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandlerInterface
{
+ use TargetPathTrait;
+
protected $httpUtils;
protected $options;
protected $providerKey;
@@ -113,8 +116,8 @@ class DefaultAuthenticationSuccessHandler implements AuthenticationSuccessHandle
return $targetUrl;
}
- if (null !== $this->providerKey && $targetUrl = $request->getSession()->get('_security.'.$this->providerKey.'.target_path')) {
- $request->getSession()->remove('_security.'.$this->providerKey.'.target_path');
+ if (null !== $this->providerKey && $targetUrl = $this->getTargetPath($request->getSession(), $this->providerKey)) {
+ $this->removeTargetPath($request->getSession(), $this->providerKey);
return $targetUrl;
}