Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
14a33ebe
Commit
14a33ebe
authored
Jul 23, 2015
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed session logout handler when a firewall is stateless
parent
db3c9b82
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
doc/changelog.rst
doc/changelog.rst
+1
-1
doc/providers/security.rst
doc/providers/security.rst
+1
-1
src/Silex/Provider/SecurityServiceProvider.php
src/Silex/Provider/SecurityServiceProvider.php
+3
-1
No files found.
doc/changelog.rst
View file @
14a33ebe
...
...
@@ -4,7 +4,7 @@ Changelog
1.3.1 (2015-XX-XX)
------------------
*
n/a
*
fixed session logout handler when a firewall is stateless
1.3.0 (2015-06-05)
------------------
...
...
doc/providers/security.rst
View file @
14a33ebe
...
...
@@ -300,7 +300,7 @@ pattern::
'secured' => array(
'pattern' => '^/admin/',
'form' => array('login_path' => '/login', 'check_path' => '/admin/login_check'),
'logout' => array('logout_path' => '/admin/logout'),
'logout' => array('logout_path' => '/admin/logout'
, 'invalidate_session' => true
),
// ...
),
...
...
src/Silex/Provider/SecurityServiceProvider.php
View file @
14a33ebe
...
...
@@ -243,6 +243,8 @@ class SecurityServiceProvider implements ServiceProviderInterface
throw
new
\LogicException
(
sprintf
(
'The "%s" authentication entry is not registered.'
,
$type
));
}
$options
[
'stateless'
]
=
$stateless
;
list
(
$providerId
,
$listenerId
,
$entryPointId
,
$position
)
=
$app
[
'security.authentication_listener.factory.'
.
$type
](
$name
,
$options
);
if
(
null
!==
$entryPointId
)
{
...
...
@@ -511,7 +513,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
);
$invalidateSession
=
isset
(
$options
[
'invalidate_session'
])
?
$options
[
'invalidate_session'
]
:
true
;
if
(
true
===
$invalidateSession
)
{
if
(
true
===
$invalidateSession
&&
false
===
$options
[
'stateless'
]
)
{
$listener
->
addHandler
(
new
SessionLogoutHandler
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment