PHPackages                             rcs\_us/slim-middleware-basic-acl - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. rcs\_us/slim-middleware-basic-acl

ActiveLibrary[HTTP &amp; Networking](/categories/http)

rcs\_us/slim-middleware-basic-acl
=================================

PSR-7 HTTP Authentication Access Middleware

1.0.2(4y ago)24761MITPHPPHP ^5.5 || ^7.0 || ^8.0

Since Jan 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/conrad10781/slim-middleware-basic-acl)[ Packagist](https://packagist.org/packages/rcs_us/slim-middleware-basic-acl)[ RSS](/packages/rcs-us-slim-middleware-basic-acl/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

PSR-7 HTTP Authentication ACL Middleware
========================================

[](#psr-7-http-authentication-acl-middleware)

This middleware provides a very simple way to implement ACL in a PSR-7 environment.

It has been tested with [Slim Framework](http://www.slimframework.com/) using the \[PSR-7 Basic Auth Middleware\] provided by tuupola ().

Install
-------

[](#install)

Install latest version using [composer](https://getcomposer.org/).

```
$ composer require rcs_us/slim-middleware-basic-acl

```

Usage
-----

[](#usage)

The middleware accepts two possible parameters.

1. An array of one or more usernames allowed to access the route. This compares against the value that is ultimately stored in $\_SERVER\["PHP\_AUTH\_USER"\] | $request-&gt;getServerParams()\["PHP\_AUTH\_USER"\] .
2. A callable that can do more complicated comparisons on $\_SERVER\["PHP\_AUTH\_USER"\] | $request-&gt;getServerParams()\["PHP\_AUTH\_USER"\] .

```
$app = new \Slim\App;
// .... implement HTTP Authentication , IE $app->add(new \Slim\Middleware\HttpBasicAuthentication( ...

// array of usernames
$app->get("/path/of/your/route", "\App\Controller\SomeController:methodToCall")->add(new \Slim\Middleware\HttpBasicACL(["username1", "username2"]));

// callable
$app->get("/path/of/your/route", "\App\Controller\SomeController:methodToCall")->add(new \Slim\Middleware\HttpBasicACL(function ($request, $response) {
    // Some Logic Here Based On $_SERVER["PHP_AUTH_USER"] | $request->getServerParams()["PHP_AUTH_USER"] .
    // Returning false will trigger a 403, true will execute route
    return false;
}));
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 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 ~1473 days

Total

2

Last Release

1614d ago

PHP version history (2 changes)1.0.0PHP ^5.5 || ^7.0

1.0.2PHP ^5.5 || ^7.0 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/238705?v=4)[conrad10781](/maintainers/conrad10781)[@conrad10781](https://github.com/conrad10781)

---

Top Contributors

[![conrad10781](https://avatars.githubusercontent.com/u/238705?v=4)](https://github.com/conrad10781 "conrad10781 (7 commits)")

---

Tags

psr-7middlewareacl

### Embed Badge

![Health badge](/badges/rcs-us-slim-middleware-basic-acl/health.svg)

```
[![Health](https://phpackages.com/badges/rcs-us-slim-middleware-basic-acl/health.svg)](https://phpackages.com/packages/rcs-us-slim-middleware-basic-acl)
```

###  Alternatives

[league/uri

URI manipulation library

1.1k228.3M363](/packages/league-uri)[psr/http-server-middleware

Common interface for HTTP server-side middleware

18399.3M1.8k](/packages/psr-http-server-middleware)[mezzio/mezzio

PSR-15 Middleware Microframework

3903.8M120](/packages/mezzio-mezzio)[relay/relay

A PSR-15 server request handler.

3302.2M94](/packages/relay-relay)[tuupola/cors-middleware

PSR-7 and PSR-15 CORS middleware

1331.9M28](/packages/tuupola-cors-middleware)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

577.0M95](/packages/laminas-laminas-stratigility)

PHPackages © 2026

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