diff options
-rw-r--r-- | Http/Firewall/ExceptionListener.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php index 6d1f27d..a1cae2a 100644 --- a/Http/Firewall/ExceptionListener.php +++ b/Http/Firewall/ExceptionListener.php @@ -47,8 +47,9 @@ class ExceptionListener private $errorPage; private $logger; private $httpUtils; + private $stateless; - public function __construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null) + public function __construct(TokenStorageInterface $tokenStorage, AuthenticationTrustResolverInterface $trustResolver, HttpUtils $httpUtils, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint = null, $errorPage = null, AccessDeniedHandlerInterface $accessDeniedHandler = null, LoggerInterface $logger = null, $stateless = false) { $this->tokenStorage = $tokenStorage; $this->accessDeniedHandler = $accessDeniedHandler; @@ -58,6 +59,7 @@ class ExceptionListener $this->authenticationTrustResolver = $trustResolver; $this->errorPage = $errorPage; $this->logger = $logger; + $this->stateless = $stateless; } /** @@ -185,7 +187,9 @@ class ExceptionListener $this->logger->debug('Calling Authentication entry point.'); } - $this->setTargetPath($request); + if (!$this->stateless) { + $this->setTargetPath($request); + } if ($authException instanceof AccountStatusException) { // remove the security token to prevent infinite redirect loops |