PHPackages                             bogosoft/http-auth - 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. bogosoft/http-auth

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

bogosoft/http-auth
==================

A library for PSR-7 and PSR-15 compliant authentication middleware.

1.0.0(5y ago)03MITPHPPHP &gt;=7.4

Since Nov 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/bogosoft-php/http-auth)[ Packagist](https://packagist.org/packages/bogosoft/http-auth)[ RSS](/packages/bogosoft-http-auth/feed)WikiDiscussions develop Synced 3w ago

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

bogosoft/http-auth
==================

[](#bogosofthttp-auth)

A PHP library for PSR-7 and PSR-15 compliant authentication middleware.

### Requirements

[](#requirements)

- PHP &gt;= 7.4

### Package Dependencies

[](#package-dependencies)

- [bogosoft/identity](https://packagist.org/packages/bogosoft/identity)

### Installation

[](#installation)

```
composer require bogosoft/http-auth
```

### Summary

[](#summary)

This small library contains a PSR-15 compliant authentication middleware component, `AuthenticationMiddleware`, with the following responsibilities:

- Derive a security context (`IPrincipal` object) from a PSR-7 compliant HTTP request. The `IPrincipal` contract is from the [`bogosoft/identity`](https://packagist.org/packages/bogosoft/identity) package.
- Pass the derived security context to a `IPrincipalHandler` object on a successful authentication attempt.
- Immediately return an HTTP response with a `401 Unauthorized` status code on a failed authentication attempt. this is configurable.

### Interfaces

[](#interfaces)

NamePurpose[`IAuthenticator`](src/IAuthenticator.php)Derives a security context (`IPrincipal`) from an HTTP request.[`IPrincipalHandler`](src/IPrincipalHandler.php)Handles a derived security context and allows for HTTP request modification.### Implementations

[](#implementations)

NameInterfaceDetails[`CompositeAuthenticator`](src/CompositeAuthenticator.php)`IAuthenticator`Allows multiple `IAuthenticator` objects to behave as one.[`DelegatedAuthenticator`](src/DelegatedAuthenticator.php)`IAuthenticator`Turns a `callable` object in an `IAuthenticator` interface.[`AuthenticationMiddleware`](src/AuthenticationMiddleware.php)`MiddlewareInterface`An authenticating middleware component.[`AttributePrincipalHandler`](src/AttributePrincipalHandler.php)`IPrincipalHandler`Stores the derived `IPrincipal` object into a mutated HTTP request as an attribute.[`DelegatedPrincipalHandler`](src/DelegatedPrincipalHandler.php)`IPrincipalHandler`Turns a `callable` object into a `IPrincipalHandler`.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

2041d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8530564fb9452a6b97b54c5cfd4da24f7f69667c217b8e37f99a593966029cdd?d=identicon)[bogocles](/maintainers/bogocles)

---

Top Contributors

[![bogocles](https://avatars.githubusercontent.com/u/8812030?v=4)](https://github.com/bogocles "bogocles (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bogosoft-http-auth/health.svg)

```
[![Health](https://phpackages.com/badges/bogosoft-http-auth/health.svg)](https://phpackages.com/packages/bogosoft-http-auth)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[typo3/cms-core

TYPO3 CMS Core

3713.2M5.1k](/packages/typo3-cms-core)

PHPackages © 2026

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