PHPackages                             kdubuc/oauth2-introspection-psr15 - 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. kdubuc/oauth2-introspection-psr15

ActiveLibrary

kdubuc/oauth2-introspection-psr15
=================================

PSR15 OAuth2 Introspection Middleware

0309PHP

Since May 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kdubuc/oauth2-introspection-psr15)[ Packagist](https://packagist.org/packages/kdubuc/oauth2-introspection-psr15)[ RSS](/packages/kdubuc-oauth2-introspection-psr15/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

OAuth2 Introspection PSR-15 Middleware
======================================

[](#oauth2-introspection-psr-15-middleware)

Protect your API with OAuth 2.0 Token Introspection [RFC 7662](https://tools.ietf.org/html/rfc7662).

[PSR-6](https://www.php-fig.org/psr/psr-6/) can be used to store introspection data during its lifetime (if expiration timestamp of the token is specified by introspection endpoint).

Install
-------

[](#install)

Via Composer

```
$ composer require kdubuc/oauth2-introspection-psr15
```

Usage
-----

[](#usage)

```
$middleware =  new Oauth2Introspection($http_psr18_client, $http_stream_psr17_factory, $http_request_psr17_factory, [
    'introspection_endpoint' => 'http://oauth2.example.com/introspect',
    'oauth2_client_id'       => 'client_id',
    'oauth2_client_secret'   => 'client_secret',
]);

$middleware->enableCache($psr6_cache);

// Introspection results will be stored into 'oauth2_access_token_introspection_data' request attribute
```

Testing
-------

[](#testing)

```
$ vendor/bin/phpunit tests/
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kévin DUBUC](https://github.com/kdubuc)
- [All Contributors](https://github.com/kdubuc/query-string-parser/graphs/contributors)

License
-------

[](#license)

The CeCILL-B License. Please see [License File](LICENSE.md) for more information.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/28f3584f827147e98199dbdd7fd524a17831006792f6c0fac136b5d591d0d6bf?d=identicon)[kdubuc](/maintainers/kdubuc)

---

Top Contributors

[![kdubuc](https://avatars.githubusercontent.com/u/895661?v=4)](https://github.com/kdubuc "kdubuc (17 commits)")

---

Tags

introspectionoauth2psr-15rfc7662

### Embed Badge

![Health badge](/badges/kdubuc-oauth2-introspection-psr15/health.svg)

```
[![Health](https://phpackages.com/badges/kdubuc-oauth2-introspection-psr15/health.svg)](https://phpackages.com/packages/kdubuc-oauth2-introspection-psr15)
```

PHPackages © 2026

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