@@ -33,7 +33,7 @@ provider available in the Security component:
3333 # ...
3434 form_login :
3535 # ...
36- csrf_provider : security.csrf.token_manager
36+ csrf_token_generator : security.csrf.token_manager
3737
3838 .. code-block :: xml
3939
@@ -50,7 +50,7 @@ provider available in the Security component:
5050
5151 <firewall name =" secured_area" >
5252 <!-- ... -->
53- <form-login csrf-provider =" security.csrf.token_manager" />
53+ <form-login csrf-token-generator =" security.csrf.token_manager" />
5454 </firewall >
5555 </config >
5656 </srv : container >
@@ -66,12 +66,16 @@ provider available in the Security component:
6666 // ...
6767 'form_login' => array(
6868 // ...
69- 'csrf_provider ' => 'security.csrf.token_manager',
69+ 'csrf_token_generator ' => 'security.csrf.token_manager',
7070 ),
7171 ),
7272 ),
7373 ));
7474
75+ .. versionadded :: 2.4
76+ The ``csrf_token_generator `` option was introduced in Symfony 2.4. Prior,
77+ you had to use the ``csrf_provider `` option.
78+
7579The Security component can be configured further, but this is all information
7680it needs to be able to use CSRF in the login form.
7781
@@ -124,7 +128,7 @@ After this, you have protected your login form against CSRF attacks.
124128.. tip ::
125129
126130 You can change the name of the field by setting ``csrf_parameter `` and change
127- the token ID by setting `` intention `` in your configuration:
131+ the token ID by setting `` csrf_token_id `` in your configuration:
128132
129133 .. configuration-block ::
130134
@@ -140,7 +144,7 @@ After this, you have protected your login form against CSRF attacks.
140144 form_login :
141145 # ...
142146 csrf_parameter : _csrf_security_token
143- intention : a_private_string
147+ csrf_token_id : a_private_string
144148
145149 .. code-block :: xml
146150
@@ -158,7 +162,7 @@ After this, you have protected your login form against CSRF attacks.
158162 <firewall name =" secured_area" >
159163 <!-- ... -->
160164 <form-login csrf-parameter =" _csrf_security_token"
161- intention =" a_private_string"
165+ csrf-token-id =" a_private_string"
162166 />
163167 </firewall >
164168 </config >
@@ -176,11 +180,15 @@ After this, you have protected your login form against CSRF attacks.
176180 'form_login' => array(
177181 // ...
178182 'csrf_parameter' => '_csrf_security_token',
179- 'intention ' => 'a_private_string',
183+ 'csrf_token_id ' => 'a_private_string'
180184 ),
181185 ),
182186 ),
183187 ));
184188
189+ .. versionadded :: 2.4
190+ The ``csrf_token_id `` option was introduced in Symfony 2.4. Prior, you
191+ had to use the ``intention `` option.
192+
185193.. _`Cross-site request forgery` : https://en.wikipedia.org/wiki/Cross-site_request_forgery
186194.. _`Forging Login Requests` : https://en.wikipedia.org/wiki/Cross-site_request_forgery#Forging_login_requests
0 commit comments