@@ -33,7 +33,7 @@ provider available in the Security component:
33
33
# ...
34
34
form_login :
35
35
# ...
36
- csrf_provider : security.csrf.token_manager
36
+ csrf_token_generator : security.csrf.token_manager
37
37
38
38
.. code-block :: xml
39
39
@@ -50,7 +50,7 @@ provider available in the Security component:
50
50
51
51
<firewall name =" secured_area" >
52
52
<!-- ... -->
53
- <form-login csrf-provider =" security.csrf.token_manager" />
53
+ <form-login csrf-token-generator =" security.csrf.token_manager" />
54
54
</firewall >
55
55
</config >
56
56
</srv : container >
@@ -66,12 +66,16 @@ provider available in the Security component:
66
66
// ...
67
67
'form_login' => array(
68
68
// ...
69
- 'csrf_provider ' => 'security.csrf.token_manager',
69
+ 'csrf_token_generator ' => 'security.csrf.token_manager',
70
70
),
71
71
),
72
72
),
73
73
));
74
74
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
+
75
79
The Security component can be configured further, but this is all information
76
80
it needs to be able to use CSRF in the login form.
77
81
@@ -124,7 +128,7 @@ After this, you have protected your login form against CSRF attacks.
124
128
.. tip ::
125
129
126
130
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:
128
132
129
133
.. configuration-block ::
130
134
@@ -140,7 +144,7 @@ After this, you have protected your login form against CSRF attacks.
140
144
form_login :
141
145
# ...
142
146
csrf_parameter : _csrf_security_token
143
- intention : a_private_string
147
+ csrf_token_id : a_private_string
144
148
145
149
.. code-block :: xml
146
150
@@ -158,7 +162,7 @@ After this, you have protected your login form against CSRF attacks.
158
162
<firewall name =" secured_area" >
159
163
<!-- ... -->
160
164
<form-login csrf-parameter =" _csrf_security_token"
161
- intention =" a_private_string"
165
+ csrf-token-id =" a_private_string"
162
166
/>
163
167
</firewall >
164
168
</config >
@@ -176,11 +180,15 @@ After this, you have protected your login form against CSRF attacks.
176
180
'form_login' => array(
177
181
// ...
178
182
'csrf_parameter' => '_csrf_security_token',
179
- 'intention ' => 'a_private_string',
183
+ 'csrf_token_id ' => 'a_private_string'
180
184
),
181
185
),
182
186
),
183
187
));
184
188
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
+
185
193
.. _`Cross-site request forgery` : https://en.wikipedia.org/wiki/Cross-site_request_forgery
186
194
.. _`Forging Login Requests` : https://en.wikipedia.org/wiki/Cross-site_request_forgery#Forging_login_requests
0 commit comments