security_csrf.xml 1.3 KB

1234567891011121314151617181920212223242526
  1. <?xml version="1.0" ?>
  2. <container xmlns="http://symfony.com/schema/dic/services"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  5. <parameters>
  6. <parameter key="security.csrf.token_generator.class">Symfony\Component\Security\Csrf\TokenGenerator\UriSafeTokenGenerator</parameter>
  7. <parameter key="security.csrf.token_storage.class">Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage</parameter>
  8. <parameter key="security.csrf.token_manager.class">Symfony\Component\Security\Csrf\CsrfTokenManager</parameter>
  9. </parameters>
  10. <services>
  11. <service id="security.csrf.token_generator" class="%security.csrf.token_generator.class%" public="false" />
  12. <service id="security.csrf.token_storage" class="%security.csrf.token_storage.class%" public="false">
  13. <argument type="service" id="session" />
  14. </service>
  15. <service id="security.csrf.token_manager" class="%security.csrf.token_manager.class%">
  16. <argument type="service" id="security.csrf.token_generator" />
  17. <argument type="service" id="security.csrf.token_storage" />
  18. <argument type="service" id="request_stack" on-invalid="ignore" />
  19. </service>
  20. </services>
  21. </container>