Skip to content

Commit 83b3092

Browse files
committed
Minor tweaks
1 parent 9032cf6 commit 83b3092

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

security/csrf.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,16 +281,16 @@ Suppose you want a CSRF token per item, so in the template you have something li
281281
<button type="submit">Delete item</button>
282282
</form>
283283

284-
In addition :class:`Symfony\\Component\\Security\\Http\\Attribute\\IsCsrfTokenValid`
285-
attribute can be applied to a controller class.
286-
This will cause the CSRF token validation to be executed for all routes defined within the controller::
284+
This attribute can also be applied to a controller class. When used this way,
285+
the CSRF token validation will be applied to **all actions** defined in that
286+
controller::
287287

288288
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
289289
use Symfony\Component\Security\Http\Attribute\IsCsrfTokenValid;
290290
// ...
291291

292-
#[IsCsrfTokenValid('controller')]
293-
final class FooController extends AbstractController
292+
#[IsCsrfTokenValid('the token ID')]
293+
final class SomeController extends AbstractController
294294
{
295295
// ...
296296
}

0 commit comments

Comments
 (0)