PHPackages                             depthbomb/csrf-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. depthbomb/csrf-bundle

ActiveSymfony-bundle

depthbomb/csrf-bundle
=====================

Simple CSRF protection for Symfony routes

1.1.0(2y ago)09[1 PRs](https://github.com/depthbomb/CsrfBundle/pulls)MITPHPPHP &gt;=8.1CI passing

Since Jun 14Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/depthbomb/CsrfBundle)[ Packagist](https://packagist.org/packages/depthbomb/csrf-bundle)[ RSS](/packages/depthbomb-csrf-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

CsrfBundle
==========

[](#csrfbundle)

[![Downloads](https://camo.githubusercontent.com/aaad2af5628a4ebf979da63249bf7dcfd5a443d1e0d89394221d0a302b9b6d34/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465707468626f6d622f637372662d62756e646c65)](https://packagist.org/packages/depthbomb/csrf-bundle)

This is a simple bundle built on top of Symfony's security package that allows you to easily protect any controller or individual controller action with a CSRF token check.

Installation
------------

[](#installation)

```
$ composer require depthbomb/csrf-bundle
```

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Symfony 6.3.x

Usage
-----

[](#usage)

*CsrfBundle* uses attributes to protect controllers or controller methods. These attributes take a single string argument representing the ID of the CSRF token that will be validated on request.

```
