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

ActiveLibrary

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 6d 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 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

1995d 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

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5723.1M30](/packages/thecodingmachine-graphqlite)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[windwalker/framework

The next generation PHP framework.

25639.1k1](/packages/windwalker-framework)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)

PHPackages © 2026

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