security_legacy.php 1018 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\DependencyInjection\Loader\Configurator;
  11. use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
  12. use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager;
  13. return static function (ContainerConfigurator $container) {
  14. $container->services()
  15. // Authentication related services
  16. ->set('security.authentication.manager', AuthenticationProviderManager::class)
  17. ->args([
  18. abstract_arg('providers'),
  19. param('security.authentication.manager.erase_credentials'),
  20. ])
  21. ->call('setEventDispatcher', [service('event_dispatcher')])
  22. ->alias(AuthenticationManagerInterface::class, 'security.authentication.manager')
  23. ;
  24. };