@@ -423,15 +423,17 @@ to service ids that do not exist yet: ``wsse.security.authentication.provider``
423423
424424 <services >
425425 <service id =" wsse.security.authentication.provider"
426- class =" AppBundle\Security\Authentication\Provider\WsseProvider" public =" false" >
426+ class =" AppBundle\Security\Authentication\Provider\WsseProvider"
427+ public =" false"
428+ >
427429 <argument /> <!-- User Provider -->
428430 <argument >%kernel.cache_dir%/security/nonces</argument >
429431 </service >
430432
431433 <service id =" wsse.security.authentication.listener"
432434 class =" AppBundle\Security\Firewall\WsseListener"
433- public =" false" >
434-
435+ public =" false"
436+ >
435437 <argument type =" service" id =" security.context" />
436438 <argument type =" service" id =" security.authentication.manager" />
437439 </service >
@@ -444,29 +446,25 @@ to service ids that do not exist yet: ``wsse.security.authentication.provider``
444446 use Symfony\Component\DependencyInjection\Definition;
445447 use Symfony\Component\DependencyInjection\Reference;
446448
447- $container
448- ->setDefinition('wsse.security.authentication.provider',
449- new Definition(
450- 'AppBundle\Security\Authentication\Provider\WsseProvider', array(
451- '', // User Provider
452- '%kernel.cache_dir%/security/nonces',
453- )
454- )
449+ $definition = new Definition(
450+ 'AppBundle\Security\Authentication\Provider\WsseProvider',
451+ array(
452+ '', // User Provider
453+ '%kernel.cache_dir%/security/nonces',
455454 )
456- ->setPublic(false)
457- ;
458-
459- $container
460- ->setDefinition('wsse.security.authentication.listener',
461- new Definition(
462- 'AppBundle\Security\Firewall\WsseListener', array(
463- new Reference('security.context'),
464- new Reference('security.authentication.manager'),
465- )
466- )
455+ );
456+ $definition->setPublic(false);
457+ $container->setDefinition('wsse.security.authentication.provider', $definition)
458+
459+ $definition = new Definition(
460+ 'AppBundle\Security\Firewall\WsseListener',
461+ array(
462+ new Reference('security.context'),
463+ new Reference('security.authentication.manager'),
467464 )
468- ->setPublic(false)
469- ;
465+ );
466+ $definition->setPublic(false);
467+ $container->setDefinition('wsse.security.authentication.listener', $definition);
470468
471469 Now that your services are defined, tell your security context about your
472470factory in your bundle class:
@@ -524,7 +522,8 @@ You are finished! You can now define parts of your app as under WSSE protection.
524522 name =" wsse_secured"
525523 pattern =" ^/api/"
526524 stateless =" true"
527- wsse =" true" />
525+ wsse =" true"
526+ />
528527 </config >
529528 </srv : container >
530529
0 commit comments