PHPackages                             abouvier/slim-access - 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. [Search &amp; Filtering](/categories/search)
4. /
5. abouvier/slim-access

ActiveLibrary[Search &amp; Filtering](/categories/search)

abouvier/slim-access
====================

Access control middleware for Slim framework

v0.2.0(10y ago)747Apache-2.0PHPPHP &gt;=5.5.0

Since Sep 8Pushed 10y ago2 watchersCompare

[ Source](https://github.com/abouvier/slim-access)[ Packagist](https://packagist.org/packages/abouvier/slim-access)[ Docs](https://github.com/abouvier/slim-access)[ RSS](/packages/abouvier-slim-access/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Slim Access
===========

[](#slim-access)

Access control middleware for Slim framework.

Supported formats
-----------------

[](#supported-formats)

- IPv4 and IPv6 addresses
- CIDR notation
- *all* keyword

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

[](#installation)

```
composer require abouvier/slim-access

```

Usage
-----

[](#usage)

Only accept requests from localhost and the 192.168.1.0/24 subnet (except for 192.168.1.42):

```
use \Slim\Middleware\Access;
// ...
$app = new \Slim\Slim();
// ...
$app->add(new Access([
	'callback' => function () use ($app) {
		$app->halt(403, 'You Shall Not Pass!!!');
	},
	'list' => [
		'::1' => Access::ALLOW,
		'127.0.0.1' => Access::ALLOW,
		'192.168.1.42' => Access::DENY,
		'192.168.1.0/24' => Access::ALLOW,
		'all' => Access::DENY // optional as "all" is already denied by default
	]
]));
// ...
$app->run();
```

or:

```
$app = new \Slim\Slim();
// ...
$access = new \Slim\Middleware\Access([
	'callback' => function () use ($app) {
		$app->halt(403, 'You Shall Not Pass!!!');
	}
]);
$access->allow('::1')->allow('127.0.0.1')->deny('192.168.1.42')->allow('192.168.1.0/24')->deny('all');
$app->add($access);
// ...
$app->run();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Every ~7 days

Total

2

Last Release

3898d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/67bd11708b80c57f0f738c0887dd68355d003ba424716e451e20e8fb6759424f?d=identicon)[abouvier](/maintainers/abouvier)

---

Top Contributors

[![abouvier](https://avatars.githubusercontent.com/u/6044259?v=4)](https://github.com/abouvier "abouvier (13 commits)")

---

Tags

access-controlcidripv4ipv6middlewareslimmiddlewareslimfilteraccesscontrol

### Embed Badge

![Health badge](/badges/abouvier-slim-access/health.svg)

```
[![Health](https://phpackages.com/badges/abouvier-slim-access/health.svg)](https://phpackages.com/packages/abouvier-slim-access)
```

###  Alternatives

[clue/stream-filter

A simple and modern approach to stream filtering in PHP

1.7k261.7M7](/packages/clue-stream-filter)[laminas/laminas-filter

Programmatically filter and normalize data and files

9528.0M150](/packages/laminas-laminas-filter)[friendsofcake/search

CakePHP Search plugin using PRG pattern

1742.0M37](/packages/friendsofcake-search)[outl1ne/nova-input-filter

An input filter for Laravel Nova

24822.7k](/packages/outl1ne-nova-input-filter)[vria/nodiacritic

Tiny helper function that removes all diacritical signs from characters

113.1M13](/packages/vria-nodiacritic)[stolz/laravel-html-tidy

HTML Tidy middleware for Laravel

268.7k](/packages/stolz-laravel-html-tidy)

PHPackages © 2026

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