[Security] config refactoring
This commit is contained in:
parent
65eb70d3b6
commit
e23f39c42f
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
|
||||
|
||||
use Symfony\Component\DependencyInjection\DefinitionDecorator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
@ -25,15 +26,15 @@ class FormLoginFactory implements SecurityFactoryInterface
|
||||
{
|
||||
$provider = 'security.authentication.provider.dao.'.$id;
|
||||
$container
|
||||
->register($provider, '%security.authentication.provider.dao.class%')
|
||||
->setArguments(array(new Reference($userProvider), new Reference('security.account_checker'), $id, new Reference('security.encoder_factory')))
|
||||
->setPublic(false)
|
||||
->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.dao'))
|
||||
->setArgument(0, new Reference($userProvider))
|
||||
->setArgument(2, $id)
|
||||
->addTag('security.authentication_provider')
|
||||
;
|
||||
|
||||
// listener
|
||||
$listenerId = 'security.authentication.listener.form.'.$id;
|
||||
$listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.form'));
|
||||
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.form'));
|
||||
$listener->setArgument(3, $id);
|
||||
|
||||
// add remember-me tag
|
||||
@ -60,7 +61,7 @@ class FormLoginFactory implements SecurityFactoryInterface
|
||||
'failure_forward' => false,
|
||||
);
|
||||
foreach (array_keys($options) as $key) {
|
||||
if (isset($config[$key])) {
|
||||
if (array_key_exists($key, $config)) {
|
||||
$options[$key] = $config[$key];
|
||||
}
|
||||
}
|
||||
@ -83,8 +84,12 @@ class FormLoginFactory implements SecurityFactoryInterface
|
||||
}
|
||||
|
||||
// form entry point
|
||||
$entryPoint = $container->setDefinition($entryPointId = 'security.authentication.form_entry_point.'.$id, clone $container->getDefinition('security.authentication.form_entry_point'));
|
||||
$entryPoint->setArguments(array($options['login_path'], $options['use_forward']));
|
||||
$entryPointId = 'security.authentication.form_entry_point.'.$id;
|
||||
$container
|
||||
->setDefinition($entryPointId, new DefinitionDecorator('security.authentication.form_entry_point'))
|
||||
->addArgument($options['login_path'])
|
||||
->addArgument($options['use_forward'])
|
||||
;
|
||||
|
||||
return array($provider, $listenerId, $entryPointId);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
|
||||
|
||||
use Symfony\Component\DependencyInjection\DefinitionDecorator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
@ -25,15 +26,15 @@ class HttpBasicFactory implements SecurityFactoryInterface
|
||||
{
|
||||
$provider = 'security.authentication.provider.dao.'.$id;
|
||||
$container
|
||||
->register($provider, '%security.authentication.provider.dao.class%')
|
||||
->setArguments(array(new Reference($userProvider), new Reference('security.account_checker'), $id, new Reference('security.encoder_factory')))
|
||||
->setPublic(false)
|
||||
->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.dao'))
|
||||
->setArgument(0, new Reference($userProvider))
|
||||
->setArgument(2, $id)
|
||||
->addTag('security.authentication_provider')
|
||||
;
|
||||
|
||||
// listener
|
||||
$listenerId = 'security.authentication.listener.basic.'.$id;
|
||||
$listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.basic'));
|
||||
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.basic'));
|
||||
$listener->setArgument(2, $id);
|
||||
|
||||
if (null === $defaultEntryPoint) {
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
|
||||
|
||||
use Symfony\Component\DependencyInjection\DefinitionDecorator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
@ -25,15 +26,15 @@ class HttpDigestFactory implements SecurityFactoryInterface
|
||||
{
|
||||
$provider = 'security.authentication.provider.dao.'.$id;
|
||||
$container
|
||||
->register($provider, '%security.authentication.provider.dao.class%')
|
||||
->setArguments(array(new Reference($userProvider), new Reference('security.account_checker'), $id, new Reference('security.encoder_factory')))
|
||||
->setPublic(false)
|
||||
->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.dao'))
|
||||
->setArgument(0, new Reference($userProvider))
|
||||
->setArgument(2, $id)
|
||||
->addTag('security.authentication_provider')
|
||||
;
|
||||
|
||||
// listener
|
||||
$listenerId = 'security.authentication.listener.digest.'.$id;
|
||||
$listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.digest'));
|
||||
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.digest'));
|
||||
$listener->setArgument(2, $id);
|
||||
|
||||
if (null === $defaultEntryPoint) {
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
|
||||
|
||||
use Symfony\Component\DependencyInjection\DefinitionDecorator;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
use Symfony\Component\DependencyInjection\Parameter;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@ -19,11 +21,11 @@ class RememberMeFactory implements SecurityFactoryInterface
|
||||
}
|
||||
|
||||
// authentication provider
|
||||
$authenticationProviderId = 'security.authentication.provider.rememberme.'.$id;
|
||||
$authProviderId = 'security.authentication.provider.rememberme.'.$id;
|
||||
$container
|
||||
->register($authenticationProviderId, '%security.authentication.provider.rememberme.class%')
|
||||
->setArguments(array(new Reference('security.account_checker'), $config['key'], $id))
|
||||
->setPublic(false)
|
||||
->setDefinition($authProviderId, new DefinitionDecorator('security.authentication.provider.rememberme'))
|
||||
->addArgument(1, $config['key'])
|
||||
->addArgument(2, $id)
|
||||
->addTag('security.authentication_provider')
|
||||
;
|
||||
|
||||
@ -46,10 +48,9 @@ class RememberMeFactory implements SecurityFactoryInterface
|
||||
;
|
||||
}
|
||||
|
||||
$rememberMeServices = $container->setDefinition($rememberMeServicesId, clone $container->getDefinition($templateId));
|
||||
$arguments = $rememberMeServices->getArguments();
|
||||
$arguments[1] = $config['key'];
|
||||
$arguments[2] = $id;
|
||||
$rememberMeServices = $container->setDefinition($rememberMeServicesId, new DefinitionDecorator($templateId));
|
||||
$rememberMeServices->setArgument(1, $config['key']);
|
||||
$rememberMeServices->setArgument(2, $id);
|
||||
|
||||
if (isset($config['token-provider'])) {
|
||||
// FIXME: make the naming assumption more flexible
|
||||
@ -59,12 +60,22 @@ class RememberMeFactory implements SecurityFactoryInterface
|
||||
}
|
||||
|
||||
// remember-me options
|
||||
foreach ($arguments[3] as $name => $option) {
|
||||
$options = array(
|
||||
'name' => 'REMEMBERME',
|
||||
'lifetime' => 31536000,
|
||||
'path' => '/',
|
||||
'domain' => null,
|
||||
'secure' => false,
|
||||
'httponly' => true,
|
||||
'always_remember_me' => false,
|
||||
'remember_me_parameter' => '_remember_me',
|
||||
);
|
||||
foreach ($options as $name => $option) {
|
||||
if (array_key_exists($name, $config)) {
|
||||
$arguments[3][$name] = $config[$name];
|
||||
$options[$name] = $config[$name];
|
||||
}
|
||||
}
|
||||
$rememberMeServices->setArguments($arguments);
|
||||
$rememberMeServices->setArgument(3, $options);
|
||||
|
||||
// attach to remember-me aware listeners
|
||||
$userProviders = array();
|
||||
@ -92,10 +103,10 @@ class RememberMeFactory implements SecurityFactoryInterface
|
||||
|
||||
// remember-me listener
|
||||
$listenerId = 'security.authentication.listener.rememberme.'.$id;
|
||||
$listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.rememberme'));
|
||||
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.rememberme'));
|
||||
$listener->setArgument(1, new Reference($rememberMeServicesId));
|
||||
|
||||
return array($authenticationProviderId, $listenerId, $defaultEntryPoint);
|
||||
return array($authProviderId, $listenerId, $defaultEntryPoint);
|
||||
}
|
||||
|
||||
public function getPosition()
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
|
||||
|
||||
use Symfony\Component\DependencyInjection\DefinitionDecorator;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
@ -25,18 +27,16 @@ class X509Factory implements SecurityFactoryInterface
|
||||
{
|
||||
$provider = 'security.authentication.provider.pre_authenticated.'.$id;
|
||||
$container
|
||||
->register($provider, '%security.authentication.provider.pre_authenticated.class%')
|
||||
->setArguments(array(new Reference($userProvider), new Reference('security.account_checker'), $id))
|
||||
->setPublic(false)
|
||||
->setDefinition($provider, new DefinitionDecorator('security.authentication.provider.pre_authenticated'))
|
||||
->setArgument(0, new Reference($userProvider))
|
||||
->addArgument($id)
|
||||
->addTag('security.authentication_provider')
|
||||
;
|
||||
|
||||
// listener
|
||||
$listenerId = 'security.authentication.listener.x509.'.$id;
|
||||
$listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.authentication.listener.x509'));
|
||||
$arguments = $listener->getArguments();
|
||||
$arguments[2] = $id;
|
||||
$listener->setArguments($arguments);
|
||||
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.x509'));
|
||||
$listener->setArgument(2, $id);
|
||||
|
||||
return array($provider, $listenerId, $defaultEntryPoint);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\SecurityBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\DependencyInjection\DefinitionDecorator;
|
||||
use Symfony\Component\DependencyInjection\Alias;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
||||
@ -32,6 +33,7 @@ class SecurityExtension extends Extension
|
||||
{
|
||||
protected $requestMatchers = array();
|
||||
protected $contextListeners = array();
|
||||
protected $listenerPositions = array('pre_auth', 'form', 'http', 'remember_me');
|
||||
|
||||
public function configLoad(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
@ -58,6 +60,8 @@ class SecurityExtension extends Extension
|
||||
if (!$container->hasDefinition('security.context')) {
|
||||
$loader = new XmlFileLoader($container, array(__DIR__.'/../Resources/config', __DIR__.'/Resources/config'));
|
||||
$loader->load('security.xml');
|
||||
$loader->load('security_listeners.xml');
|
||||
$loader->load('security_rememberme.xml');
|
||||
$loader->load('templating_php.xml');
|
||||
$loader->load('templating_twig.xml');
|
||||
$loader->load('collectors.xml');
|
||||
@ -185,26 +189,18 @@ class SecurityExtension extends Extension
|
||||
$arguments[1] = $userProviders;
|
||||
$definition->setArguments($arguments);
|
||||
|
||||
// load service templates
|
||||
$c = new ContainerBuilder($container->getParameterBag());
|
||||
$loader = new XmlFileLoader($c, array(__DIR__.'/../Resources/config', __DIR__.'/Resources/config'));
|
||||
$loader->load('security_templates.xml');
|
||||
|
||||
foreach ($this->normalizeConfig($config, 'template') as $template) {
|
||||
$loader->load($c->getParameterBag()->resolveValue($template));
|
||||
}
|
||||
$container->merge($c);
|
||||
// create security listener factories
|
||||
$factories = $this->createListenerFactories($container, $config);
|
||||
|
||||
// load firewall map
|
||||
$mapDef = $container->getDefinition('security.firewall.map');
|
||||
$map = array();
|
||||
foreach ($firewalls as $firewall) {
|
||||
list($matcher, $listeners, $exceptionListener) = $this->createFirewall($container, $firewall, $providerIds);
|
||||
list($matcher, $listeners, $exceptionListener) = $this->createFirewall($container, $firewall, $providerIds, $factories);
|
||||
|
||||
$contextId = 'security.firewall.map.context.'.count($map);
|
||||
$context = $container->setDefinition($contextId, clone $container->getDefinition('security.firewall.context'));
|
||||
$context = $container->setDefinition($contextId, new DefinitionDecorator('security.firewall.context'));
|
||||
$context
|
||||
->setPublic(true)
|
||||
->setArgument(0, $listeners)
|
||||
->setArgument(1, $exceptionListener)
|
||||
;
|
||||
@ -213,7 +209,7 @@ class SecurityExtension extends Extension
|
||||
$mapDef->setArgument(1, $map);
|
||||
}
|
||||
|
||||
protected function createFirewall(ContainerBuilder $container, $firewall, $providerIds)
|
||||
protected function createFirewall(ContainerBuilder $container, $firewall, $providerIds, array $factories)
|
||||
{
|
||||
// unique id for this firewall
|
||||
$id = md5(serialize($firewall));
|
||||
@ -266,7 +262,7 @@ class SecurityExtension extends Extension
|
||||
// Logout listener
|
||||
if (array_key_exists('logout', $firewall)) {
|
||||
$listenerId = 'security.logout_listener.'.$id;
|
||||
$listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.logout_listener'));
|
||||
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.logout_listener'));
|
||||
|
||||
$listeners[] = new Reference($listenerId);
|
||||
|
||||
@ -274,15 +270,13 @@ class SecurityExtension extends Extension
|
||||
$firewall['logout'] = array();
|
||||
}
|
||||
|
||||
$arguments = $listener->getArguments();
|
||||
if (isset($firewall['logout']['path'])) {
|
||||
$arguments[1] = $firewall['logout']['path'];
|
||||
$listener->setArgument(1, $firewall['logout']['path']);
|
||||
}
|
||||
|
||||
if (isset($firewall['logout']['target'])) {
|
||||
$arguments[2] = $firewall['logout']['target'];
|
||||
$listener->setArgument(2, $firewall['logout']['target']);
|
||||
}
|
||||
$listener->setArguments($arguments);
|
||||
|
||||
// add session logout handler
|
||||
$invalidateSession = true;
|
||||
@ -299,15 +293,15 @@ class SecurityExtension extends Extension
|
||||
// add cookie logout handler
|
||||
if (count($cookies = $this->normalizeConfig($firewall['logout'], 'cookie')) > 0) {
|
||||
$cookieHandlerId = 'security.logout.handler.cookie_clearing.'.$id;
|
||||
$cookieHandler = $container->setDefinition($cookieHandlerId, clone $container->getDefinition('security.logout.handler.cookie_clearing'));
|
||||
$cookieHandler->setArguments(array($cookies));
|
||||
$cookieHandler = $container->setDefinition($cookieHandlerId, new DefinitionDecorator('security.logout.handler.cookie_clearing'));
|
||||
$cookieHandler->addArgument($cookies);
|
||||
|
||||
$listener->addMethodCall('addHandler', array(new Reference($cookieHandlerId)));
|
||||
}
|
||||
}
|
||||
|
||||
// Authentication listeners
|
||||
list($authListeners, $providers, $defaultEntryPoint) = $this->createAuthenticationListeners($container, $id, $firewall, $defaultProvider);
|
||||
list($authListeners, $providers, $defaultEntryPoint) = $this->createAuthenticationListeners($container, $id, $firewall, $defaultProvider, $factories);
|
||||
|
||||
$listeners = array_merge($listeners, $authListeners);
|
||||
|
||||
@ -343,36 +337,20 @@ class SecurityExtension extends Extension
|
||||
}
|
||||
|
||||
$listenerId = 'security.context_listener.'.count($this->contextListeners);
|
||||
$listener = $container->setDefinition($listenerId, clone $container->getDefinition('security.context_listener'));
|
||||
$arguments = $listener->getArguments();
|
||||
$arguments[2] = $contextKey;
|
||||
$listener->setArguments($arguments);
|
||||
$listener = $container->setDefinition($listenerId, new DefinitionDecorator('security.context_listener'));
|
||||
$listener->setArgument(2, $contextKey);
|
||||
|
||||
return $this->contextListeners[$contextKey] = $listenerId;
|
||||
}
|
||||
|
||||
protected function createAuthenticationListeners($container, $id, $firewall, $defaultProvider)
|
||||
protected function createAuthenticationListeners($container, $id, $firewall, $defaultProvider, array $factories)
|
||||
{
|
||||
$listeners = array();
|
||||
$providers = array();
|
||||
$hasListeners = false;
|
||||
$defaultEntryPoint = null;
|
||||
|
||||
$positions = array('pre_auth', 'form', 'http', 'remember_me');
|
||||
|
||||
$tags = $container->findTaggedServiceIds('security.listener.factory');
|
||||
$factories = array();
|
||||
foreach ($positions as $position) {
|
||||
$factories[$position] = array();
|
||||
}
|
||||
|
||||
foreach (array_keys($tags) as $tag) {
|
||||
$factory = $container->get($tag);
|
||||
|
||||
$factories[$factory->getPosition()][] = $factory;
|
||||
}
|
||||
|
||||
foreach ($positions as $position) {
|
||||
foreach ($this->listenerPositions as $position) {
|
||||
foreach ($factories[$position] as $factory) {
|
||||
$key = $factory->getKey();
|
||||
$keybis = str_replace('-', '_', $key);
|
||||
@ -427,6 +405,35 @@ class SecurityExtension extends Extension
|
||||
return $providerIds;
|
||||
}
|
||||
|
||||
protected function createListenerFactories(ContainerBuilder $container, $config)
|
||||
{
|
||||
// load service templates
|
||||
$c = new ContainerBuilder();
|
||||
$parameterBag = $container->getParameterBag();
|
||||
$loader = new XmlFileLoader($c, array(__DIR__.'/../Resources/config', __DIR__.'/Resources/config'));
|
||||
$loader->load('security_factories.xml');
|
||||
|
||||
// load user-created listener factories
|
||||
foreach ($this->normalizeConfig($config, 'factory', 'factories') as $factory) {
|
||||
$loader->load($parameterBag->resolveValue($factory));
|
||||
}
|
||||
|
||||
$tags = $c->findTaggedServiceIds('security.listener.factory');
|
||||
|
||||
$factories = array();
|
||||
foreach ($this->listenerPositions as $position) {
|
||||
$factories[$position] = array();
|
||||
}
|
||||
|
||||
foreach (array_keys($tags) as $tag) {
|
||||
$factory = $c->get($tag);
|
||||
|
||||
$factories[$factory->getPosition()][] = $factory;
|
||||
}
|
||||
|
||||
return $factories;
|
||||
}
|
||||
|
||||
protected function createEncoders($config, ContainerBuilder $container)
|
||||
{
|
||||
$encoders = $this->normalizeConfig($config, 'encoder');
|
||||
@ -623,19 +630,16 @@ class SecurityExtension extends Extension
|
||||
}
|
||||
|
||||
$exceptionListenerId = 'security.exception_listener.'.$id;
|
||||
$listener = $container->setDefinition($exceptionListenerId, clone $container->getDefinition('security.exception_listener'));
|
||||
$arguments = $listener->getArguments();
|
||||
$arguments[2] = null === $defaultEntryPoint ? null : new Reference($defaultEntryPoint);
|
||||
$listener = $container->setDefinition($exceptionListenerId, new DefinitionDecorator('security.exception_listener'));
|
||||
$listener->setArgument(2, null === $defaultEntryPoint ? null : new Reference($defaultEntryPoint));
|
||||
|
||||
// access denied handler setup
|
||||
if (isset($config['access-denied-handler'])) {
|
||||
$arguments[4] = new Reference($config['access-denied-handler']);
|
||||
$listener->setArgument(4, new Reference($config['access-denied-handler']));
|
||||
} else if (isset($config['access-denied-url'])) {
|
||||
$arguments[3] = $config['access-denied-url'];
|
||||
$listener->setArgument(3, $config['access-denied-url']);
|
||||
}
|
||||
|
||||
$listener->setArguments($arguments);
|
||||
|
||||
return $exceptionListenerId;
|
||||
}
|
||||
|
||||
@ -644,17 +648,15 @@ class SecurityExtension extends Extension
|
||||
$userProvider = isset($config['provider']) ? $this->getUserProviderId($config['provider']) : $defaultProvider;
|
||||
|
||||
$switchUserListenerId = 'security.authentication.switchuser_listener.'.$id;
|
||||
$listener = $container->setDefinition($switchUserListenerId, clone $container->getDefinition('security.authentication.switchuser_listener'));
|
||||
$arguments = $listener->getArguments();
|
||||
$arguments[1] = new Reference($userProvider);
|
||||
$listener->setArguments($arguments);
|
||||
|
||||
if (isset($config['role'])) {
|
||||
$container->setParameter('security.authentication.switchuser.role', $config['role']);
|
||||
}
|
||||
$listener = $container->setDefinition($switchUserListenerId, new DefinitionDecorator('security.authentication.switchuser_listener'));
|
||||
$listener->setArgument(1, new Reference($userProvider));
|
||||
|
||||
if (isset($config['parameter'])) {
|
||||
$container->setParameter('security.authentication.switchuser.parameter', $config['parameter']);
|
||||
$listener->setArgument(5, $config['parameter']);
|
||||
}
|
||||
|
||||
if (isset($config['role'])) {
|
||||
$listener->setArgument(6, $config['role']);
|
||||
}
|
||||
|
||||
return $switchUserListenerId;
|
||||
|
@ -22,65 +22,11 @@
|
||||
<parameter key="security.authentication.trust_resolver.anonymous_class">Symfony\Component\Security\Core\Authentication\Token\AnonymousToken</parameter>
|
||||
<parameter key="security.authentication.trust_resolver.rememberme_class">Symfony\Component\Security\Core\Authentication\Token\RememberMeToken</parameter>
|
||||
|
||||
<parameter key="security.authentication.provider.dao.class">Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider</parameter>
|
||||
<parameter key="security.authentication.provider.pre_authenticated.class">Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider</parameter>
|
||||
<parameter key="security.authentication.provider.rememberme.class">Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider</parameter>
|
||||
|
||||
<parameter key="security.authentication.manager.class">Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager</parameter>
|
||||
|
||||
<parameter key="security.authentication.retry_entry_point.class">Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint</parameter>
|
||||
|
||||
<parameter key="security.authentication.session_strategy.class">Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy</parameter>
|
||||
<parameter key="security.authentication.session_strategy.strategy">migrate</parameter>
|
||||
|
||||
<parameter key="security.authentication.form_entry_point.class">Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint</parameter>
|
||||
<parameter key="security.authentication.listener.form.class">Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener</parameter>
|
||||
<parameter key="security.authentication.form.options" type="collection" />
|
||||
|
||||
<parameter key="security.authentication.basic_entry_point.class">Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint</parameter>
|
||||
<parameter key="security.authentication.basic_entry_point.realm">Symfony2</parameter>
|
||||
|
||||
<parameter key="security.authentication.digest_entry_point.class">Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint</parameter>
|
||||
<parameter key="security.authentication.digest_entry_point.realm">Symfony2</parameter>
|
||||
<parameter key="security.authentication.digest_entry_point.key">SomethingUnique</parameter>
|
||||
|
||||
<parameter key="security.authentication.listener.x509.class">Symfony\Component\Security\Http\Firewall\X509AuthenticationListener</parameter>
|
||||
<parameter key="security.authentication.x509.user">SSL_CLIENT_S_DN_Email</parameter>
|
||||
<parameter key="security.authentication.x509.credentials">SSL_CLIENT_S_DN</parameter>
|
||||
|
||||
<parameter key="security.authentication.listener.basic.class">Symfony\Component\Security\Http\Firewall\BasicAuthenticationListener</parameter>
|
||||
<parameter key="security.authentication.listener.digest.class">Symfony\Component\Security\Http\Firewall\DigestAuthenticationListener</parameter>
|
||||
<parameter key="security.authentication.listener.anonymous.class">Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener</parameter>
|
||||
|
||||
<parameter key="security.authentication.provider.anonymous">Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider</parameter>
|
||||
<parameter key="security.anonymous.key">SomeRandomValue</parameter>
|
||||
|
||||
<parameter key="security.authentication.listener.rememberme.class">Symfony\Component\Security\Http\Firewall\RememberMeListener</parameter>
|
||||
<parameter key="security.rembemerme.token.provider.in_memory.class">Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider</parameter>
|
||||
|
||||
<parameter key="security.authentication.rememberme.services.persistent.class">Symfony\Component\Security\Http\RememberMe\PersistentTokenBasedRememberMeServices</parameter>
|
||||
<parameter key="security.authentication.rememberme.services.simplehash.class">Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices</parameter>
|
||||
<parameter key="security.authentication.rememberme.services.options.name">SYMFONY_REMEMBERME</parameter>
|
||||
<parameter key="security.authentication.rememberme.services.options.lifetime">31536000</parameter>
|
||||
<parameter key="security.authentication.rememberme.services.options.path">/</parameter>
|
||||
<parameter key="security.authentication.rememberme.services.options.domain" />
|
||||
<parameter key="security.authentication.rememberme.services.options.secure">false</parameter>
|
||||
<parameter key="security.authentication.rememberme.services.options.httponly">true</parameter>
|
||||
<parameter key="security.authentication.rememberme.services.options.always_remember_me">false</parameter>
|
||||
<parameter key="security.authentication.rememberme.services.options.remember_me_parameter">_remember_me</parameter>
|
||||
|
||||
<parameter key="security.channel_listener.class">Symfony\Component\Security\Http\Firewall\ChannelListener</parameter>
|
||||
|
||||
<parameter key="security.logout_listener.class">Symfony\Component\Security\Http\Firewall\LogoutListener</parameter>
|
||||
<parameter key="security.logout.path">/logout</parameter>
|
||||
<parameter key="security.logout.target_path">/</parameter>
|
||||
<parameter key="security.logout.handler.session.class">Symfony\Component\Security\Http\Logout\SessionLogoutHandler</parameter>
|
||||
<parameter key="security.logout.handler.cookie_clearing.class">Symfony\Component\Security\Http\Logout\CookieClearingLogoutHandler</parameter>
|
||||
|
||||
<parameter key="security.authentication.switchuser_listener.class">Symfony\Component\Security\Http\Firewall\SwitchUserListener</parameter>
|
||||
<parameter key="security.authentication.switchuser.role">ROLE_ALLOWED_TO_SWITCH</parameter>
|
||||
<parameter key="security.authentication.switchuser.parameter">_switch_user</parameter>
|
||||
|
||||
<parameter key="security.access.decision_manager.class">Symfony\Component\Security\Core\Authorization\AccessDecisionManager</parameter>
|
||||
<parameter key="security.access.decision_manager.strategy">affirmative</parameter>
|
||||
<parameter key="security.access.decision_manager.allow_if_all_abstain">false</parameter>
|
||||
@ -92,10 +38,6 @@
|
||||
<parameter key="security.access.authenticated_voter.class">Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter</parameter>
|
||||
<parameter key="security.access.role_hierarchy_voter.class">Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter</parameter>
|
||||
|
||||
<parameter key="security.access_listener.class">Symfony\Component\Security\Http\Firewall\AccessListener</parameter>
|
||||
<parameter key="security.access_map.class">Symfony\Component\Security\Http\AccessMap</parameter>
|
||||
<parameter key="security.exception_listener.class">Symfony\Component\Security\Http\Firewall\ExceptionListener</parameter>
|
||||
<parameter key="security.context_listener.class">Symfony\Component\Security\Http\Firewall\ContextListener</parameter>
|
||||
<parameter key="security.firewall.class">Symfony\Component\Security\Http\Firewall</parameter>
|
||||
<parameter key="security.firewall.map.class">Symfony\Bundle\SecurityBundle\Security\FirewallMap</parameter>
|
||||
<parameter key="security.firewall.context.class">Symfony\Bundle\SecurityBundle\Security\FirewallContext</parameter>
|
||||
@ -111,35 +53,11 @@
|
||||
<argument>%security.context.always_authenticate%</argument>
|
||||
</service>
|
||||
|
||||
<service id="security.role_hierarchy" class="%security.role_hierarchy.class%" public="false">
|
||||
<argument>%security.role_hierarchy.roles%</argument>
|
||||
</service>
|
||||
|
||||
<service id="security.account_checker" class="%security.account_checker.class%" public="false" />
|
||||
|
||||
<service id="security.encoder_factory.generic" class="%security.encoder_factory.generic.class%" public="false">
|
||||
<argument type="collection"></argument>
|
||||
</service>
|
||||
|
||||
<service id="security.encoder_factory" alias="security.encoder_factory.generic"></service>
|
||||
|
||||
<service id="security.logout.handler.session" class="%security.logout.handler.session.class%" public="false"></service>
|
||||
|
||||
<service id="security.authentication.listener.anonymous" class="%security.authentication.listener.anonymous.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument>%security.anonymous.key%</argument>
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<!-- Authentication related services -->
|
||||
<service id="security.authentication.manager" class="%security.authentication.manager.class%" public="false">
|
||||
<argument type="collection" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.provider.anonymous" class="%security.authentication.provider.anonymous%" public="false">
|
||||
<argument>%security.anonymous.key%</argument>
|
||||
<tag name="security.authentication_provider" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.trust_resolver" class="%security.authentication.trust_resolver.class%" public="false">
|
||||
<argument>%security.authentication.trust_resolver.anonymous_class%</argument>
|
||||
<argument>%security.authentication.trust_resolver.rememberme_class%</argument>
|
||||
@ -148,45 +66,45 @@
|
||||
<service id="security.authentication.session_strategy" class="%security.authentication.session_strategy.class%" public="false">
|
||||
<argument>%security.authentication.session_strategy.strategy%</argument>
|
||||
</service>
|
||||
|
||||
<service id="security.rememberme.token.provider.in_memory" class="%security.rembemerme.token.provider.in_memory.class%" public="false"></service>
|
||||
|
||||
<service id="security.authentication.retry_entry_point" class="%security.authentication.retry_entry_point.class%" public="false" />
|
||||
|
||||
<service id="security.authentication.basic_entry_point" class="%security.authentication.basic_entry_point.class%" public="false">
|
||||
<argument>%security.authentication.basic_entry_point.realm%</argument>
|
||||
<service id="security.encoder_factory.generic" class="%security.encoder_factory.generic.class%" public="false">
|
||||
<argument type="collection"></argument>
|
||||
</service>
|
||||
|
||||
<service id="security.encoder_factory" alias="security.encoder_factory.generic"></service>
|
||||
|
||||
<service id="security.account_checker" class="%security.account_checker.class%" public="false" />
|
||||
|
||||
<service id="security.authentication.digest_entry_point" class="%security.authentication.digest_entry_point.class%" public="false">
|
||||
<argument>%security.authentication.digest_entry_point.realm%</argument>
|
||||
<argument>%security.authentication.digest_entry_point.key%</argument>
|
||||
</service>
|
||||
|
||||
<service id="security.channel_listener" class="%security.channel_listener.class%" public="false">
|
||||
<argument type="service" id="security.access_map" />
|
||||
<argument type="service" id="security.authentication.retry_entry_point" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<!-- Authorization related services -->
|
||||
<service id="security.access.decision_manager" class="%security.access.decision_manager.class%" public="false">
|
||||
<argument type="collection"></argument>
|
||||
<argument>%security.access.decision_manager.strategy%</argument>
|
||||
<argument>%security.access.decision_manager.allow_if_all_abstain%</argument>
|
||||
<argument>%security.access.decision_manager.allow_if_equal_granted_denied%</argument>
|
||||
</service>
|
||||
<service id="security.access_map" class="%security.access_map.class%" public="false" />
|
||||
|
||||
<service id="security.role_hierarchy" class="%security.role_hierarchy.class%" public="false">
|
||||
<argument>%security.role_hierarchy.roles%</argument>
|
||||
</service>
|
||||
|
||||
|
||||
<!-- Security Voters -->
|
||||
<service id="security.access.simple_role_voter" class="%security.access.simple_role_voter.class%" public="false">
|
||||
<tag name="security.voter" />
|
||||
</service>
|
||||
|
||||
<service id="security.access.authenticated_voter" class="%security.access.authenticated_voter.class%" public="false">
|
||||
<argument type="service" id="security.authentication.trust_resolver" />
|
||||
<tag name="security.voter" />
|
||||
</service>
|
||||
|
||||
<service id="security.access.role_hierarchy_voter" class="%security.access.role_hierarchy_voter.class%" public="false">
|
||||
<argument type="service" id="security.role_hierarchy" />
|
||||
</service>
|
||||
|
||||
|
||||
<!-- Firewall related services -->
|
||||
<service id="security.firewall" class="%security.firewall.class%">
|
||||
<tag name="kernel.listener" event="core.request" method="handle" priority="-128" />
|
||||
<argument type="service" id="security.firewall.map" />
|
||||
@ -198,11 +116,9 @@
|
||||
<argument type="collection" />
|
||||
</service>
|
||||
|
||||
<service id="security.context_listener" class="%security.context_listener.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="collection"></argument>
|
||||
<argument />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
<service id="security.firewall.context" class="%security.firewall.context.class%" abstract="true">
|
||||
<argument type="collection" />
|
||||
<argument type="service" id="security.exception_listener" />
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://www.symfony-project.org/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<services>
|
||||
<service id="security.authentication.factory.form" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FormLoginFactory">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.factory.x509" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\X509Factory">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.factory.basic" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpBasicFactory">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.factory.digest" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpDigestFactory">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.factory.remember_me" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\RememberMeFactory">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://www.symfony-project.org/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<parameters>
|
||||
<parameter key="security.authentication.retry_entry_point.class">Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint</parameter>
|
||||
|
||||
<parameter key="security.channel_listener.class">Symfony\Component\Security\Http\Firewall\ChannelListener</parameter>
|
||||
|
||||
<parameter key="security.authentication.form_entry_point.class">Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint</parameter>
|
||||
<parameter key="security.authentication.listener.form.class">Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener</parameter>
|
||||
|
||||
<parameter key="security.authentication.listener.basic.class">Symfony\Component\Security\Http\Firewall\BasicAuthenticationListener</parameter>
|
||||
<parameter key="security.authentication.basic_entry_point.class">Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint</parameter>
|
||||
<parameter key="security.authentication.basic_entry_point.realm">Symfony2</parameter>
|
||||
|
||||
<parameter key="security.authentication.listener.digest.class">Symfony\Component\Security\Http\Firewall\DigestAuthenticationListener</parameter>
|
||||
<parameter key="security.authentication.digest_entry_point.class">Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint</parameter>
|
||||
<parameter key="security.authentication.digest_entry_point.realm">Symfony2</parameter>
|
||||
<parameter key="security.authentication.digest_entry_point.key">SomethingUnique</parameter>
|
||||
|
||||
<parameter key="security.authentication.listener.x509.class">Symfony\Component\Security\Http\Firewall\X509AuthenticationListener</parameter>
|
||||
<parameter key="security.authentication.x509.user">SSL_CLIENT_S_DN_Email</parameter>
|
||||
<parameter key="security.authentication.x509.credentials">SSL_CLIENT_S_DN</parameter>
|
||||
|
||||
<parameter key="security.authentication.listener.anonymous.class">Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener</parameter>
|
||||
|
||||
<parameter key="security.authentication.switchuser_listener.class">Symfony\Component\Security\Http\Firewall\SwitchUserListener</parameter>
|
||||
<parameter key="security.authentication.switchuser.role">ROLE_ALLOWED_TO_SWITCH</parameter>
|
||||
<parameter key="security.authentication.switchuser.parameter">_switch_user</parameter>
|
||||
|
||||
<parameter key="security.logout_listener.class">Symfony\Component\Security\Http\Firewall\LogoutListener</parameter>
|
||||
<parameter key="security.logout.path">/logout</parameter>
|
||||
<parameter key="security.logout.target_path">/</parameter>
|
||||
<parameter key="security.logout.handler.session.class">Symfony\Component\Security\Http\Logout\SessionLogoutHandler</parameter>
|
||||
<parameter key="security.logout.handler.cookie_clearing.class">Symfony\Component\Security\Http\Logout\CookieClearingLogoutHandler</parameter>
|
||||
|
||||
<parameter key="security.access_listener.class">Symfony\Component\Security\Http\Firewall\AccessListener</parameter>
|
||||
<parameter key="security.access_map.class">Symfony\Component\Security\Http\AccessMap</parameter>
|
||||
<parameter key="security.exception_listener.class">Symfony\Component\Security\Http\Firewall\ExceptionListener</parameter>
|
||||
<parameter key="security.context_listener.class">Symfony\Component\Security\Http\Firewall\ContextListener</parameter>
|
||||
|
||||
<parameter key="security.authentication.provider.dao.class">Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider</parameter>
|
||||
<parameter key="security.authentication.provider.pre_authenticated.class">Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider</parameter>
|
||||
|
||||
<parameter key="security.authentication.provider.anonymous">Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider</parameter>
|
||||
<parameter key="security.anonymous.key">SomeRandomValue</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="security.authentication.listener.anonymous" class="%security.authentication.listener.anonymous.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument>%security.anonymous.key%</argument>
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.provider.anonymous" class="%security.authentication.provider.anonymous%" public="false">
|
||||
<argument>%security.anonymous.key%</argument>
|
||||
<tag name="security.authentication_provider" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.retry_entry_point" class="%security.authentication.retry_entry_point.class%" public="false" />
|
||||
|
||||
<service id="security.authentication.basic_entry_point" class="%security.authentication.basic_entry_point.class%" public="false">
|
||||
<argument>%security.authentication.basic_entry_point.realm%</argument>
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.digest_entry_point" class="%security.authentication.digest_entry_point.class%" public="false">
|
||||
<argument>%security.authentication.digest_entry_point.realm%</argument>
|
||||
<argument>%security.authentication.digest_entry_point.key%</argument>
|
||||
</service>
|
||||
|
||||
<service id="security.channel_listener" class="%security.channel_listener.class%" public="false">
|
||||
<argument type="service" id="security.access_map" />
|
||||
<argument type="service" id="security.authentication.retry_entry_point" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.access_map" class="%security.access_map.class%" public="false" />
|
||||
|
||||
<service id="security.context_listener" class="%security.context_listener.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="collection"></argument>
|
||||
<argument />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.logout_listener" class="%security.logout_listener.class%" public="false" abstract="true">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument>%security.logout.path%</argument>
|
||||
<argument>%security.logout.target_path%</argument>
|
||||
</service>
|
||||
<service id="security.logout.handler.session" class="%security.logout.handler.session.class%" public="false" />
|
||||
<service id="security.logout.handler.cookie_clearing" class="%security.logout.handler.cookie_clearing.class%" public="false" abstract="true" />
|
||||
|
||||
<service id="security.authentication.form_entry_point" class="%security.authentication.form_entry_point.class%" public="false" abstract="true" />
|
||||
|
||||
<service id="security.authentication.listener.abstract" abstract="true" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument type="service" id="security.authentication.session_strategy" />
|
||||
<argument />
|
||||
<argument type="collection"></argument>
|
||||
<argument type="service" id="security.authentication.success_handler" on-invalid="null" />
|
||||
<argument type="service" id="security.authentication.failure_handler" on-invalid="null" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.listener.form"
|
||||
class="%security.authentication.listener.form.class%"
|
||||
parent="security.authentication.listener.abstract"
|
||||
abstract="true">
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.listener.x509" class="%security.authentication.listener.x509.class%" public="false" abstract="true">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument />
|
||||
<argument>%security.authentication.x509.user%</argument>
|
||||
<argument>%security.authentication.x509.credentials%</argument>
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.listener.basic" class="%security.authentication.listener.basic.class%" public="false" abstract="true">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument></argument>
|
||||
<argument type="service" id="security.authentication.basic_entry_point" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.listener.digest" class="%security.authentication.listener.digest.class%" public="false" abstract="true">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.user.provider.in_memory" />
|
||||
<argument></argument>
|
||||
<argument type="service" id="security.authentication.digest_entry_point" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.provider.dao" class="%security.authentication.provider.dao.class%" abstract="true" public="false">
|
||||
<argument /> <!-- User Provider -->
|
||||
<argument type="service" id="security.account_checker" />
|
||||
<argument /> <!-- Provider-shared Key -->
|
||||
<argument type="service" id="security.encoder_factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.provider.pre_authenticated" class="%security.authentication.provider.pre_authenticated.class%" abstract="true" public="false">
|
||||
<argument /> <!-- User Provider -->
|
||||
<argument type="service" id="security.account_checker" />
|
||||
</service>
|
||||
|
||||
<service id="security.exception_listener" class="%security.exception_listener.class%" public="false" abstract="true">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.trust_resolver" />
|
||||
<argument type="service" id="security.authentication.entry_point" on-invalid="null" />
|
||||
<argument>%security.access.denied_url%</argument>
|
||||
<argument type="service" id="security.access.denied_handler" on-invalid="null" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.switchuser_listener" class="%security.authentication.switchuser_listener.class%" public="false" abstract="true">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.user.provider.in_memory" />
|
||||
<argument type="service" id="security.account_checker" />
|
||||
<argument type="service" id="security.access.decision_manager" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
<argument>%security.authentication.switchuser.parameter%</argument>
|
||||
<argument>%security.authentication.switchuser.role%</argument>
|
||||
</service>
|
||||
|
||||
<service id="security.access_listener" class="%security.access_listener.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.access.decision_manager" />
|
||||
<argument type="service" id="security.access_map" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://www.symfony-project.org/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<parameters>
|
||||
<parameter key="security.authentication.provider.rememberme.class">Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider</parameter>
|
||||
|
||||
<parameter key="security.authentication.listener.rememberme.class">Symfony\Component\Security\Http\Firewall\RememberMeListener</parameter>
|
||||
<parameter key="security.rembemerme.token.provider.in_memory.class">Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider</parameter>
|
||||
|
||||
<parameter key="security.authentication.rememberme.services.persistent.class">Symfony\Component\Security\Http\RememberMe\PersistentTokenBasedRememberMeServices</parameter>
|
||||
<parameter key="security.authentication.rememberme.services.simplehash.class">Symfony\Component\Security\Http\RememberMe\TokenBasedRememberMeServices</parameter>
|
||||
</parameters>
|
||||
|
||||
<services>
|
||||
<service id="security.authentication.listener.rememberme" class="%security.authentication.listener.rememberme.class%" public="false" abstract="true">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.rememberme" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.provider.rememberme" class="%security.authentication.provider.rememberme.class%" abstract="true" public="false">
|
||||
<argument type="service" id="security.account_checker" />
|
||||
</service>
|
||||
|
||||
<service id="security.rememberme.token.provider.in_memory" class="%security.rembemerme.token.provider.in_memory.class%" public="false"></service>
|
||||
|
||||
<service id="security.authentication.rememberme.services.abstract" abstract="true" public="false">
|
||||
<argument type="collection" /> <!-- User Providers -->
|
||||
<argument /> <!-- Shared Token Key -->
|
||||
<argument /> <!-- Shared Provider Key -->
|
||||
<argument type="collection" /> <!-- Options -->
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.rememberme.services.persistent"
|
||||
class="%security.authentication.rememberme.services.persistent.class%"
|
||||
parent="security.authentication.rememberme.services.abstract"
|
||||
abstract="true">
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.rememberme.services.simplehash"
|
||||
class="%security.authentication.rememberme.services.simplehash.class%"
|
||||
parent="security.authentication.rememberme.services.abstract"
|
||||
abstract="true">
|
||||
</service>
|
||||
</services>
|
||||
|
||||
</container>
|
@ -1,153 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://www.symfony-project.org/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<services>
|
||||
<service id="security.authentication.factory.form" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FormLoginFactory" public="false">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.factory.x509" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\X509Factory" public="false">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.factory.basic" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpBasicFactory" public="false">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.factory.digest" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\HttpDigestFactory" public="false">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.factory.remember_me" class="Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\RememberMeFactory" public="false">
|
||||
<tag name="security.listener.factory" />
|
||||
</service>
|
||||
|
||||
<service id="security.logout_listener" class="%security.logout_listener.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument>%security.logout.path%</argument>
|
||||
<argument>%security.logout.target_path%</argument>
|
||||
</service>
|
||||
|
||||
<service id="security.logout.handler.cookie_clearing" class="%security.logout.handler.cookie_clearing.class%" public="false">
|
||||
<argument type="collection"></argument>
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.form_entry_point" class="%security.authentication.form_entry_point.class%" public="false">
|
||||
<argument/>
|
||||
<argument/>
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.listener.form" class="%security.authentication.listener.form.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument type="service" id="security.authentication.session_strategy" />
|
||||
<argument />
|
||||
<argument type="collection"></argument>
|
||||
<argument type="service" id="security.authentication.success_handler" on-invalid="null" />
|
||||
<argument type="service" id="security.authentication.failure_handler" on-invalid="null" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.listener.rememberme" class="%security.authentication.listener.rememberme.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.rememberme" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.listener.x509" class="%security.authentication.listener.x509.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument />
|
||||
<argument>%security.authentication.x509.user%</argument>
|
||||
<argument>%security.authentication.x509.credentials%</argument>
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.listener.basic" class="%security.authentication.listener.basic.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument></argument>
|
||||
<argument type="service" id="security.authentication.basic_entry_point" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.listener.digest" class="%security.authentication.listener.digest.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.user.provider.in_memory" />
|
||||
<argument></argument>
|
||||
<argument type="service" id="security.authentication.digest_entry_point" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.rememberme.services.simplehash" class="%security.authentication.rememberme.services.simplehash.class%" public="false">
|
||||
<argument type="collection" />
|
||||
<argument />
|
||||
<argument />
|
||||
<argument type="collection">
|
||||
<argument key="name">%security.authentication.rememberme.services.options.name%</argument>
|
||||
<argument key="lifetime">%security.authentication.rememberme.services.options.lifetime%</argument>
|
||||
<argument key="path">%security.authentication.rememberme.services.options.path%</argument>
|
||||
<argument key="domain">%security.authentication.rememberme.services.options.domain%</argument>
|
||||
<argument key="secure">%security.authentication.rememberme.services.options.secure%</argument>
|
||||
<argument key="httponly">%security.authentication.rememberme.services.options.httponly%</argument>
|
||||
<argument key="always_remember_me">%security.authentication.rememberme.services.options.always_remember_me%</argument>
|
||||
<argument key="remember_me_parameter">%security.authentication.rememberme.services.options.remember_me_parameter%</argument>
|
||||
</argument>
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.authentication.rememberme.services.persistent" class="%security.authentication.rememberme.services.persistent.class%" public="false">
|
||||
<argument type="collection" />
|
||||
<argument />
|
||||
<argument />
|
||||
<argument type="collection">
|
||||
<argument key="name">%security.authentication.rememberme.services.options.name%</argument>
|
||||
<argument key="lifetime">%security.authentication.rememberme.services.options.lifetime%</argument>
|
||||
<argument key="path">%security.authentication.rememberme.services.options.path%</argument>
|
||||
<argument key="domain">%security.authentication.rememberme.services.options.domain%</argument>
|
||||
<argument key="secure">%security.authentication.rememberme.services.options.secure%</argument>
|
||||
<argument key="httponly">%security.authentication.rememberme.services.options.httponly%</argument>
|
||||
<argument key="always_remember_me">%security.authentication.rememberme.services.options.always_remember_me%</argument>
|
||||
<argument key="remember_me_parameter">%security.authentication.rememberme.services.options.remember_me_parameter%</argument>
|
||||
</argument>
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.exception_listener" class="%security.exception_listener.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.authentication.trust_resolver" />
|
||||
<argument type="service" id="security.authentication.entry_point" on-invalid="null" />
|
||||
<argument>%security.access.denied_url%</argument>
|
||||
<argument type="service" id="security.access.denied_handler" on-invalid="null" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
|
||||
<service id="security.authentication.switchuser_listener" class="%security.authentication.switchuser_listener.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.user.provider.in_memory" />
|
||||
<argument type="service" id="security.account_checker" />
|
||||
<argument type="service" id="security.access.decision_manager" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
<argument>%security.authentication.switchuser.parameter%</argument>
|
||||
<argument>%security.authentication.switchuser.role%</argument>
|
||||
</service>
|
||||
|
||||
<service id="security.access_listener" class="%security.access_listener.class%" public="false">
|
||||
<argument type="service" id="security.context" />
|
||||
<argument type="service" id="security.access.decision_manager" />
|
||||
<argument type="service" id="security.access_map" />
|
||||
<argument type="service" id="security.authentication.manager" />
|
||||
<argument type="service" id="logger" on-invalid="null" />
|
||||
</service>
|
||||
|
||||
<service id="security.firewall.context" class="%security.firewall.context.class%" public="false">
|
||||
<argument type="collection" />
|
||||
<argument type="service" id="security.exception_listener" />
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
Reference in New Issue
Block a user