PHPackages                             codemonster-ru/security - 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. codemonster-ru/security

ActiveLibrary[Security](/categories/security)

codemonster-ru/security
=======================

Security components for Annabel ecosystem: CSRF protection and rate limiting.

v1.1.0(4mo ago)0111MITPHPPHP &gt;=8.2CI passing

Since Dec 17Pushed 4mo agoCompare

[ Source](https://github.com/codemonster-ru/security)[ Packagist](https://packagist.org/packages/codemonster-ru/security)[ Docs](https://github.com/codemonster-ru/security)[ RSS](/packages/codemonster-ru-security/feed)WikiDiscussions main Synced 1mo ago

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

codemonster-ru/security
=======================

[](#codemonster-rusecurity)

[![Latest Version on Packagist](https://camo.githubusercontent.com/871711b28365d25a4864ea22fd9fff947360accb9df9e4e38c405c303a749f3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f64656d6f6e737465722d72752f73656375726974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codemonster-ru/security)[![Total Downloads](https://camo.githubusercontent.com/453fd094eeaf402f8c0510827fda843f234a02f53941af358514faa39f866110/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64656d6f6e737465722d72752f73656375726974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codemonster-ru/security)[![License](https://camo.githubusercontent.com/15b79efc461103b1d913d1e364a3bccbe45bd0f8cc0da98291812994568e002f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f64656d6f6e737465722d72752f73656375726974792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codemonster-ru/security)[![Tests](https://github.com/codemonster-ru/security/actions/workflows/tests.yml/badge.svg)](https://github.com/codemonster-ru/security/actions/workflows/tests.yml)

`codemonster-ru/security` is a set of reusable security components for the Annabel ecosystem:

- CSRF protection (`VerifyCsrfToken`) with a token from POST (`_token`) and/or headers (`X-CSRF-TOKEN`, `X-XSRF-TOKEN`)
- Rate limiting / brute-force protection (`ThrottleRequests`) with a configurable key and storage layer

No Laravel/Symfony dependencies. Compatible with `codemonster-ru/http` and `codemonster-ru/session`.

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

[](#installation)

```
composer require codemonster-ru/security
```

For monorepo development, you can use a `path` repository (as in `annabel-skeleton/composer.local.json`).

Quick Start (Annabel)
---------------------

[](#quick-start-annabel)

Annabel loads providers from `bootstrap/providers/*.php`.

1. Add a provider:

`bootstrap/providers/SecurityServiceProvider.php`

```
