PHPackages                             codecollab/csrf-token - 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. [Security](/categories/security)
4. /
5. codecollab/csrf-token

ActiveLibrary[Security](/categories/security)

codecollab/csrf-token
=====================

CSRF token package of the CodeCollab project

2.0.0(9y ago)270111See the LICENSE filePHPPHP ^7

Since Dec 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/CodeCollab/CsrfToken)[ Packagist](https://packagist.org/packages/codecollab/csrf-token)[ Docs](https://github.com/CodeCollab/CsrfToken)[ RSS](/packages/codecollab-csrf-token/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (1)

CsrfToken
=========

[](#csrftoken)

CSRF token package of the CodeCollab project

[![Build Status](https://camo.githubusercontent.com/735884e577e952d40cae0e468ad0692b0fcfda137358f9e52d3c7ec119cd0211/68747470733a2f2f7472617669732d63692e6f72672f436f6465436f6c6c61622f43737266546f6b656e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/CodeCollab/CsrfToken) [![MIT License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](mit) [![Latest Stable Version](https://camo.githubusercontent.com/b2fc8e6408bf7015dec5d75558bab3257b94167f3f56966dc6c47579ef906ee3/68747470733a2f2f706f7365722e707567782e6f72672f636f6465636f6c6c61622f637372662d746f6b656e2f762f737461626c65)](https://packagist.org/packages/codecollab/csrf-token) [![Total Downloads](https://camo.githubusercontent.com/9cce680f2de2fafa935018d7071586aeebe297e81d2790c1991b19f7c3890c3b/68747470733a2f2f706f7365722e707567782e6f72672f636f6465636f6c6c61622f637372662d746f6b656e2f646f776e6c6f616473)](https://packagist.org/packages/codecollab/csrf-token) [![Latest Unstable Version](https://camo.githubusercontent.com/6a9ad876756e76474f779f94380c434de3e223052e22e211b8a2aa4bbb5ea063/68747470733a2f2f706f7365722e707567782e6f72672f636f6465636f6c6c61622f637372662d746f6b656e2f762f756e737461626c65)](https://packagist.org/packages/codecollab/csrf-token)

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

[](#requirements)

PHP7+

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

[](#installation)

Include the library in your project using composer:

```
{
    "require-dev": {
        "codecollab/csrf-token": "^2"
    }
}

```

Usage
-----

[](#usage)

This library securely generates and validates CSRF tokens. To use this libray simply create a new `\CodeCollab\CsrfToken\Token` instance. A functioning concrete implementation is added as `\CodeCollab\CsrfToken\Token\Handler`:

```
