|
| 1 | +<?php |
| 2 | + |
| 3 | +/* |
| 4 | + * This file is part of the Symfony package. |
| 5 | + * |
| 6 | + * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | + * |
| 8 | + * For the full copyright and license information, please view the LICENSE |
| 9 | + * file that was distributed with this source code. |
| 10 | + */ |
| 11 | + |
| 12 | +namespace Symfony\Component\DependencyInjection\Loader\Configurator; |
| 13 | + |
| 14 | +use Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener; |
| 15 | +use Symfony\Component\Security\Guard\GuardAuthenticatorHandler; |
| 16 | +use Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider; |
| 17 | + |
| 18 | +return static function (ContainerConfigurator $container) { |
| 19 | + $container->services() |
| 20 | + ->set('security.authentication.guard_handler', GuardAuthenticatorHandler::class) |
| 21 | + ->call('setSessionAuthenticationStrategy', [service('security.authentication.session_strategy')]) |
| 22 | + ->args([ |
| 23 | + service('security.token_storage'), |
| 24 | + service('event_dispatcher')->nullOnInvalid(), |
| 25 | + abstract_arg('stateless firewall keys'), |
| 26 | + ]) |
| 27 | + |
| 28 | + ->alias('Symfony\Component\Security\Guard\GuardAuthenticatorHandler', 'security.authentication.guard_handler') |
| 29 | + |
| 30 | + ->set('security.authentication.provider.guard', GuardAuthenticationProvider::class) |
| 31 | + ->abstract() |
| 32 | + ->args([ |
| 33 | + abstract_arg('Simple Authenticator'), |
| 34 | + abstract_arg('User Provider'), |
| 35 | +
A973
abstract_arg('Provider-shared Key'), |
| 36 | + abstract_arg('User Checker'), |
| 37 | + service('security.password_encoder'), |
| 38 | + ]) |
| 39 | + |
| 40 | + ->set('security.authentication.listener.guard', GuardAuthenticationListener::class) |
| 41 | + ->abstract() |
| 42 | + ->args([ |
| 43 | + service('security.authentication.guard_handler'), |
| 44 | + service('security.authentication.manager'), |
| 45 | + abstract_arg('Provider-shared Key'), |
| 46 | + abstract_arg('Authenticator'), |
| 47 | + service('logger')->nullOnInvalid(), |
| 48 | + ]) |
| 49 | + ->tag('monolog.logger', ['channel' => 'security']) |
| 50 | + ; |
| 51 | +}; |
0 commit comments