PHPackages                             p9d/oauth2-toolkit - 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. p9d/oauth2-toolkit

ActiveLibrary

p9d/oauth2-toolkit
==================

v0.1.1(4mo ago)0392MITPHPPHP ^8.3CI failing

Since Aug 1Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/pizzaminded/oauth2-toolkit)[ Packagist](https://packagist.org/packages/p9d/oauth2-toolkit)[ RSS](/packages/p9d-oauth2-toolkit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

`p9d/oauth2-toolkit`
====================

[](#p9doauth2-toolkit)

Tools to deal with OAuth2/OpenID protocols.

If your identity providers are providing an well-known OpenID Configuration endpoint, you can use them to discover all required things to integrate with them:

```
$providers = [
    'your-provider-name-here' => [
        'configuration_endpoint' => 'https:///realms/ACME/.well-known/openid-configuration',
        'client_id' => 'XXXXXXXXXXXXX'
    ],
    'google' => [
        'configuration_endpoint' => 'https://accounts.google.com/.well-known/openid-configuration'
    ]
];

$factory = new \P9D\OAuth2Toolkit\OpenIdConfigurationFactory(
    $providers,
    \Symfony\Component\HttpClient\HttpClient::create()
);

# Access provider config via:
$provider = $factory->createForProvider('your-provider-name-here');
```

Provider configuration:
-----------------------

[](#provider-configuration)

- `configuration_endpoint` - URL to [OpenID Discovery Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html)
- `?client_id` Client ID used for this provider

Methods available in `OpenIdConfigurationService`
-------------------------------------------------

[](#methods-available-in-openidconfigurationservice)

### `getAuthorizationUrl(): string`

[](#getauthorizationurl-string)

Returns a link user should be redirected to login.

#### parameters:

[](#parameters)

- `grantType`,
- `redirectUri`
- `?clientId` - when not passed, value passed in `client_id` from configuration will be used.
- `?scope`
- `?state`

### `getJwks(): array`

[](#getjwks-array)

Returns an array of JSON Web Key Set.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance78

Regular maintenance activity

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Every ~133 days

Total

5

Last Release

121d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8dd963f53bf4337582dfabc903e4ee83da9414fbe913bf44928f53d30be029fc?d=identicon)[pizzaminded](/maintainers/pizzaminded)

---

Top Contributors

[![pizzaminded](https://avatars.githubusercontent.com/u/13077797?v=4)](https://github.com/pizzaminded "pizzaminded (19 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/p9d-oauth2-toolkit/health.svg)

```
[![Health](https://phpackages.com/badges/p9d-oauth2-toolkit/health.svg)](https://phpackages.com/packages/p9d-oauth2-toolkit)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[veewee/xml

XML without worries

1835.9M29](/packages/veewee-xml)[php-soap/wsdl-reader

A WSDL reader in PHP

212.3M9](/packages/php-soap-wsdl-reader)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[storyblok/php-content-api-client

PHP Client for Storyblok Content API

11136.8k4](/packages/storyblok-php-content-api-client)

PHPackages © 2026

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