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
a9d57bfb
Commit
a9d57bfb
authored
Jun 23, 2012
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed default entry point
parent
8b776dfb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/Silex/Provider/SecurityServiceProvider.php
src/Silex/Provider/SecurityServiceProvider.php
+8
-2
No files found.
src/Silex/Provider/SecurityServiceProvider.php
View file @
a9d57bfb
...
...
@@ -117,6 +117,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
);
});
// generate the build-in authentication factories
foreach
(
array
(
'logout'
,
'pre_auth'
,
'form'
,
'http'
,
'remember_me'
,
'anonymous'
)
as
$type
)
{
$entryPoint
=
$type
==
'http'
?
'http'
:
'form'
;
...
...
@@ -147,7 +148,7 @@ class SecurityServiceProvider implements ServiceProviderInterface
$providers
=
array
();
$configs
=
array
();
foreach
(
$app
[
'security.firewalls'
]
as
$name
=>
$firewall
)
{
$entryPoint
=
'form'
;
$entryPoint
=
null
;
$pattern
=
isset
(
$firewall
[
'pattern'
])
?
$firewall
[
'pattern'
]
:
null
;
$users
=
isset
(
$firewall
[
'users'
])
?
$firewall
[
'users'
]
:
array
();
unset
(
$firewall
[
'pattern'
],
$firewall
[
'users'
]);
...
...
@@ -211,6 +212,9 @@ class SecurityServiceProvider implements ServiceProviderInterface
}
if
(
!
isset
(
$app
[
'security.exception_listener.'
.
$name
]))
{
if
(
null
==
$entryPoint
)
{
$app
[
$entryPoint
=
'security.entry_point.'
.
$name
.
'.form'
]
=
$app
[
'security.entry_point.form._proto'
](
$name
);
}
$app
[
'security.exception_listener.'
.
$name
]
=
$app
[
'security.exception_listener._proto'
](
$entryPoint
,
$name
);
}
}
...
...
@@ -218,7 +222,9 @@ class SecurityServiceProvider implements ServiceProviderInterface
$configs
[]
=
array
(
$pattern
,
$listeners
,
$protected
);
}
$app
[
'security.authentication_providers'
]
=
array_map
(
function
(
$provider
)
use
(
$app
)
{
return
$app
[
$provider
];
},
$providers
);
$app
[
'security.authentication_providers'
]
=
array_map
(
function
(
$provider
)
use
(
$app
)
{
return
$app
[
$provider
];
},
$providers
);
$map
=
new
FirewallMap
();
foreach
(
$configs
as
$config
)
{
...
...
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