diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-10-06 09:19:06 +0200 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-10-06 09:19:06 +0200 |
commit | 16dabc326311f084d671be188c7941bbb3c341c9 (patch) | |
tree | 3210a7688ea2bfa1bff5fd0422b52adf570edcdc /src/Wallabag/ApiBundle/DependencyInjection | |
parent | fdef5f460524215d806e244e5546865f4b8e01df (diff) | |
parent | 8263e71192989dc0fd28a41ac22f9c5b32eb11c4 (diff) | |
download | wallabag-16dabc326311f084d671be188c7941bbb3c341c9.tar.gz wallabag-16dabc326311f084d671be188c7941bbb3c341c9.tar.zst wallabag-16dabc326311f084d671be188c7941bbb3c341c9.zip |
Merge pull request #1436 from wallabag/v2-register
Public registration & oAuth2 \o/
Diffstat (limited to 'src/Wallabag/ApiBundle/DependencyInjection')
-rw-r--r-- | src/Wallabag/ApiBundle/DependencyInjection/Security/Factory/WsseFactory.php | 40 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php | 5 |
2 files changed, 0 insertions, 45 deletions
diff --git a/src/Wallabag/ApiBundle/DependencyInjection/Security/Factory/WsseFactory.php b/src/Wallabag/ApiBundle/DependencyInjection/Security/Factory/WsseFactory.php deleted file mode 100644 index 402eb869..00000000 --- a/src/Wallabag/ApiBundle/DependencyInjection/Security/Factory/WsseFactory.php +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ApiBundle\DependencyInjection\Security\Factory; | ||
4 | |||
5 | use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
6 | use Symfony\Component\DependencyInjection\Reference; | ||
7 | use Symfony\Component\DependencyInjection\DefinitionDecorator; | ||
8 | use Symfony\Component\Config\Definition\Builder\NodeDefinition; | ||
9 | use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface; | ||
10 | |||
11 | class WsseFactory implements SecurityFactoryInterface | ||
12 | { | ||
13 | public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) | ||
14 | { | ||
15 | $providerId = 'security.authentication.provider.wsse.'.$id; | ||
16 | $container | ||
17 | ->setDefinition($providerId, new DefinitionDecorator('wsse.security.authentication.provider')) | ||
18 | ->replaceArgument(0, new Reference($userProvider)) | ||
19 | ; | ||
20 | |||
21 | $listenerId = 'security.authentication.listener.wsse.'.$id; | ||
22 | $listener = $container->setDefinition($listenerId, new DefinitionDecorator('wsse.security.authentication.listener')); | ||
23 | |||
24 | return array($providerId, $listenerId, $defaultEntryPoint); | ||
25 | } | ||
26 | |||
27 | public function getPosition() | ||
28 | { | ||
29 | return 'pre_auth'; | ||
30 | } | ||
31 | |||
32 | public function getKey() | ||
33 | { | ||
34 | return 'wsse'; | ||
35 | } | ||
36 | |||
37 | public function addConfiguration(NodeDefinition $node) | ||
38 | { | ||
39 | } | ||
40 | } | ||
diff --git a/src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php b/src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php index c5cc204e..cde43aed 100644 --- a/src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php +++ b/src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php | |||
@@ -3,9 +3,7 @@ | |||
3 | namespace Wallabag\ApiBundle\DependencyInjection; | 3 | namespace Wallabag\ApiBundle\DependencyInjection; |
4 | 4 | ||
5 | use Symfony\Component\DependencyInjection\ContainerBuilder; | 5 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
6 | use Symfony\Component\Config\FileLocator; | ||
7 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; | 6 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
8 | use Symfony\Component\DependencyInjection\Loader; | ||
9 | 7 | ||
10 | class WallabagApiExtension extends Extension | 8 | class WallabagApiExtension extends Extension |
11 | { | 9 | { |
@@ -13,9 +11,6 @@ class WallabagApiExtension extends Extension | |||
13 | { | 11 | { |
14 | $configuration = new Configuration(); | 12 | $configuration = new Configuration(); |
15 | $config = $this->processConfiguration($configuration, $configs); | 13 | $config = $this->processConfiguration($configuration, $configs); |
16 | |||
17 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | ||
18 | $loader->load('services.yml'); | ||
19 | } | 14 | } |
20 | 15 | ||
21 | public function getAlias() | 16 | public function getAlias() |