PHPackages                             hovensoft/duskphp-middleware - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hovensoft/duskphp-middleware

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hovensoft/duskphp-middleware
============================

A middleware 's collection

v1.0.0(8y ago)08GNU General Public License v3.0PHPPHP &gt;=7.1.0

Since Aug 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Hovensoft/duskphp-middleware)[ Packagist](https://packagist.org/packages/hovensoft/duskphp-middleware)[ RSS](/packages/hovensoft-duskphp-middleware/feed)WikiDiscussions master Synced 2w ago

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

DuskPHP - Middleware
====================

[](#duskphp---middleware)

[![Build Status](https://camo.githubusercontent.com/f2880f253adaeaa98cf71071f67e5206d601cde4b3749b165ea3ad18648793e3/68747470733a2f2f7472617669732d63692e6f72672f486f76656e736f66742f6475736b7068702d6d6964646c65776172652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Hovensoft/duskphp-middleware)[![Coverage Status](https://camo.githubusercontent.com/8f350edd8be209452337be39b266c9eb61f9394c5339e81ef301cf3b1a11a53e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f486f76656e736f66742f6475736b7068702d6d6964646c65776172652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Hovensoft/duskphp-middleware?branch=master)

Provide middleware:

- a CSRF authenticator which protect against CSRF attack with a token authentication

How to use
----------

[](#how-to-use)

- \## CSRF Authenticator **How to use it ?**

This middleware check every POST, PUT and DELETE request for a CSRF token.

```
$middleware = new CsrfMiddleware($_SESSION, 200);
$dispatcher->pipe($middleware);
```

**Input**

The middleware check if the string `` is in response and replace it with the authenticator's token.

```

   ...

```

LICENSE
-------

[](#license)

DuskPHP - A simple PHP framework build with middleware pattern

Copyright (C) 2017 HovenSoft

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see [www.gnu.org/licenses](http://www.gnu.org/licenses).

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3230d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb71ba52715dc422ec2884cc821aff028556b88d6548caae6bfbb78932a7ad51?d=identicon)[Dederobert](/maintainers/Dederobert)

---

Top Contributors

[![dederobert](https://avatars.githubusercontent.com/u/1359693?v=4)](https://github.com/dederobert "dederobert (6 commits)")

---

Tags

csrf-preventioncsrf-protectioncsrf-tokenshttp-middlewaremiddlewarepsr-15psr-7

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/hovensoft-duskphp-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/hovensoft-duskphp-middleware/health.svg)](https://phpackages.com/packages/hovensoft-duskphp-middleware)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k34](/packages/neuron-core-neuron-ai)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[razorpay/ifsc

Razorpay IFSC Codes Library

385204.4k](/packages/razorpay-ifsc)[anthropic-ai/sdk

Anthropic PHP SDK

163372.1k15](/packages/anthropic-ai-sdk)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
