summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Http/Firewall/AbstractAuthenticationListener.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php
index 1caaf0a..a5924ff 100644
--- a/Http/Firewall/AbstractAuthenticationListener.php
+++ b/Http/Firewall/AbstractAuthenticationListener.php
@@ -98,6 +98,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
'use_referer' => false,
'failure_path' => null,
'failure_forward' => false,
+ 'require_previous_session' => true,
), $options);
$this->logger = $logger;
$this->dispatcher = $dispatcher;
@@ -132,7 +133,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
}
try {
- if (!$request->hasPreviousSession()) {
+ if ($this->options['require_previous_session'] && !$request->hasPreviousSession()) {
throw new SessionUnavailableException('Your session has timed out, or you have disabled cookies.');
}