PHPackages                             brace/mod-auth-basic - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. brace/mod-auth-basic

ActiveProject[Authentication &amp; Authorization](/categories/authentication)

brace/mod-auth-basic
====================

Http Basic authentication

v1.0.0(2y ago)0919MITPHPPHP &gt;=8.0

Since May 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/brace-project/brace-mod-auth-basic)[ Packagist](https://packagist.org/packages/brace/mod-auth-basic)[ Docs](https://infracamp.org)[ RSS](/packages/brace-mod-auth-basic/feed)WikiDiscussions main Synced 1mo ago

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

brace-mod-auth-basic
====================

[](#brace-mod-auth-basic)

HTTP Basic Authentication

Example
-------

[](#example)

Validate against closure function
---------------------------------

[](#validate-against-closure-function)

```
$app->pipe->addMiddleWare(
    new AuthBasicMiddleware(new \Brace\Auth\Basic\Validator\LambdaAuthValidator(
        function (\Brace\Auth\Basic\BasicAuthToken $basicAuthToken) {
            return $basicAuthToken->user === "client1" && $basicAuthToken->passwd === "test";
        }
    ))
);
```

Validate against File
---------------------

[](#validate-against-file)

```
$app->pipe->addMiddleWare(
    new AuthBasicMiddleware(new ClientIdFileAuthValidator(CONFIG_PATH . "/clients.yml"))
);
```

- [clients.yml demo](demo/clients.yml)

Dont't forget to call

```
$basicAuthToken->validate();
```

To verify the Token is valid

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

737d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/878a384d056698a2400e4b7c8858db05a6caebb2c560e67151be36d46d58def0?d=identicon)[dermatthes](/maintainers/dermatthes)

---

Top Contributors

[![dermatthes](https://avatars.githubusercontent.com/u/13380559?v=4)](https://github.com/dermatthes "dermatthes (18 commits)")

---

Tags

dependency-injectiondiPhore

### Embed Badge

![Health badge](/badges/brace-mod-auth-basic/health.svg)

```
[![Health](https://phpackages.com/badges/brace-mod-auth-basic/health.svg)](https://phpackages.com/packages/brace-mod-auth-basic)
```

###  Alternatives

[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[laminas/laminas-servicemanager

Factory-Driven Dependency Injection Container

15955.1M694](/packages/laminas-laminas-servicemanager)[level-2/dice

A minimalist Dependency injection container (DIC) for PHP. Please note: 3.0+ is only compatible with PHP 7.0. The 2.0 branch is compatbile with PHP 5.6.

437730.3k17](/packages/level-2-dice)[aura/di

A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.

356968.3k58](/packages/aura-di)[yiisoft/injector

PSR-11 compatible injector. Executes a callable and makes an instances by injecting dependencies from a given DI container.

942.8M38](/packages/yiisoft-injector)[mrclay/props-dic

Props is a simple DI container that allows retrieving values via custom property and method names

3611.7M3](/packages/mrclay-props-dic)

PHPackages © 2026

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