vendor/scheb/two-factor-bundle/SchebTwoFactorBundle.php line 14

Open in your IDE?
  1. <?php
  2. namespace Scheb\TwoFactorBundle;
  3. use Scheb\TwoFactorBundle\DependencyInjection\Compiler\AuthenticationProviderDecoratorCompilerPass;
  4. use Scheb\TwoFactorBundle\DependencyInjection\Compiler\RememberMeServicesDecoratorCompilerPass;
  5. use Scheb\TwoFactorBundle\DependencyInjection\Compiler\TwoFactorFirewallConfigCompilerPass;
  6. use Scheb\TwoFactorBundle\DependencyInjection\Compiler\TwoFactorProviderCompilerPass;
  7. use Scheb\TwoFactorBundle\DependencyInjection\Factory\Security\TwoFactorFactory;
  8. use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
  9. use Symfony\Component\DependencyInjection\ContainerBuilder;
  10. use Symfony\Component\HttpKernel\Bundle\Bundle;
  11. class SchebTwoFactorBundle extends Bundle
  12. {
  13.     public function build(ContainerBuilder $container)
  14.     {
  15.         parent::build($container);
  16.         $container->addCompilerPass(new AuthenticationProviderDecoratorCompilerPass());
  17.         $container->addCompilerPass(new RememberMeServicesDecoratorCompilerPass());
  18.         $container->addCompilerPass(new TwoFactorProviderCompilerPass());
  19.         $container->addCompilerPass(new TwoFactorFirewallConfigCompilerPass());
  20.         /** @var SecurityExtension $extension */
  21.         $extension $container->getExtension('security');
  22.         $extension->addSecurityListenerFactory(new TwoFactorFactory());
  23.     }
  24. }