Code

< 40 %
40-60 %
> 60 %
1
<?php
2
3
/*
4
 * This file is part of the SecurityApiBundle package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace OsLab\SecurityApiBundle;
11
12
use OsLab\SecurityApiBundle\DependencyInjection\Security\UserProvider\InMemoryApiFactory;
13
use Symfony\Component\DependencyInjection\ContainerBuilder;
14
use Symfony\Component\HttpKernel\Bundle\Bundle;
15
16
/**
17
 * An implementation of BundleInterface.
18
 *
19
 * @author Michael COULLERET <[email protected]>
20
 */
21
class OsLabSecurityApiBundle extends Bundle
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26 3
    public function build(ContainerBuilder $container)
27
    {
28 3
        parent::build($container);
29
30 3
        $extension = $container->getExtension('security');
31
32 3
        $extension->addUserProviderFactory(new InMemoryApiFactory());
33 3
    }
34
}
35