1 | <?php |
||
2 | |||
3 | namespace DoL\LdapBundle; |
||
4 | |||
5 | use DoL\LdapBundle\Security\Factory\FormLoginLdapFactory; |
||
6 | use DoL\LdapBundle\Security\Factory\HttpBasicLdapFactory; |
||
7 | use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension; |
||
8 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
9 | use Symfony\Component\HttpKernel\Bundle\Bundle; |
||
10 | |||
11 | /** |
||
12 | * DoLLdapBundle. |
||
13 | * |
||
14 | * @author DarwinOnLine |
||
15 | * @author Maks3w |
||
16 | * |
||
17 | * @see https://github.com/DarwinOnLine/DoLLdapBundle |
||
18 | */ |
||
19 | class DoLLdapBundle extends Bundle |
||
20 | { |
||
21 | public function build(ContainerBuilder $container) |
||
22 | { |
||
23 | parent::build($container); |
||
24 | |||
25 | /** @var SecurityExtension $extension */ |
||
26 | $extension = $container->getExtension('security'); |
||
27 | $extension->addSecurityListenerFactory(new FormLoginLdapFactory()); |
||
28 | $extension->addSecurityListenerFactory(new HttpBasicLdapFactory()); |
||
29 | } |
||
30 | } |
||
31 |