summaryrefslogtreecommitdiffstats
path: root/Http
diff options
context:
space:
mode:
authorAdrien BRAULT <monsti@gmail.com>2012-07-09 01:05:31 +0200
committerAdrien BRAULT <monsti@gmail.com>2012-07-09 01:05:31 +0200
commit38657489962caba23677abfb4ceee6cde86bc464 (patch)
tree1026f3b2c6994d49170b6d578fd2089186321e32 /Http
parentf5719bac71c1b44dfdd48ccc9249edfde94c3204 (diff)
downloadsymfony-security-38657489962caba23677abfb4ceee6cde86bc464.zip
symfony-security-38657489962caba23677abfb4ceee6cde86bc464.tar.gz
symfony-security-38657489962caba23677abfb4ceee6cde86bc464.tar.bz2
[Security] Add an option to disable the hasPreviousSession() check in AbstractAuthenticationListener
Diffstat (limited to 'Http')
-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.');
}