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

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