PHPackages                             digitalcz/oidc-discovery - 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. digitalcz/oidc-discovery

Abandoned → [digitalcz/openid-connect](/?search=digitalcz%2Fopenid-connect)ArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

digitalcz/oidc-discovery
========================

PHP implementation of https://openid.net/specs/openid-connect-discovery-1\_0.html

v0.2.0(4y ago)2282[5 PRs](https://github.com/digitalcz/oidc-discovery/pulls)MITPHPPHP ^8.0

Since Nov 1Pushed 3y ago4 watchersCompare

[ Source](https://github.com/digitalcz/oidc-discovery)[ Packagist](https://packagist.org/packages/digitalcz/oidc-discovery)[ Docs](https://github.com/digitalcz/oidc-discovery)[ RSS](/packages/digitalcz-oidc-discovery/feed)WikiDiscussions 0.x Synced 4w ago

READMEChangelog (2)Dependencies (19)Versions (8)Used By (0)

OIDC Discovery
==============

[](#oidc-discovery)

[![Latest Stable Version](https://camo.githubusercontent.com/1a101794a7e004bcf8599899bb2d648b884dd22047b213bf298a6dc4db2e3c1e/687474703a2f2f706f7365722e707567782e6f72672f6469676974616c637a2f6f6964632d646973636f766572792f76)](https://packagist.org/packages/digitalcz/oidc-discovery)[![Total Downloads](https://camo.githubusercontent.com/fbdb7652ed25382c96e457f03e716aca2bdc4ac05ae447ea9c78ee15a28291ba/687474703a2f2f706f7365722e707567782e6f72672f6469676974616c637a2f6f6964632d646973636f766572792f646f776e6c6f616473)](https://packagist.org/packages/digitalcz/oidc-discovery)[![Latest Unstable Version](https://camo.githubusercontent.com/e5665b7b8c287ca529b64abcd7efd921642a3cb7cc938874e73c97c787597409/687474703a2f2f706f7365722e707567782e6f72672f6469676974616c637a2f6f6964632d646973636f766572792f762f756e737461626c65)](https://packagist.org/packages/digitalcz/oidc-discovery)[![License](https://camo.githubusercontent.com/6c869899ffc8b0752120ce3c3ab371776672c5585de150ad59043a383f7d3349/687474703a2f2f706f7365722e707567782e6f72672f6469676974616c637a2f6f6964632d646973636f766572792f6c6963656e7365)](https://packagist.org/packages/digitalcz/oidc-discovery)[![PHP Version Require](https://camo.githubusercontent.com/3814e30eab1476f40a15262275e01ecf63f8d161b5e6a67f6f28cefc077b61cc/687474703a2f2f706f7365722e707567782e6f72672f6469676974616c637a2f6f6964632d646973636f766572792f726571756972652f706870)](https://packagist.org/packages/digitalcz/oidc-discovery)![CI](https://github.com/digitalcz/oidc-discovery/workflows/CI/badge.svg)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/349345f72f3125a5aa03ae8e4b26de4ec5141e6bfe6d4d585438c19a1e5fbbb3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6469676974616c637a2f6f6964632d646973636f766572792f6261646765732f7175616c6974792d73636f72652e706e673f623d302e78)](https://scrutinizer-ci.com/g/digitalcz/oidc-discovery/?branch=0.x)[![codecov](https://camo.githubusercontent.com/31add9bc0fdd4e508b83991a18732357ea61b46db51494d7661a76e0ab6e8b5c/68747470733a2f2f636f6465636f762e696f2f67682f6469676974616c637a2f6f6964632d646973636f766572792f6272616e63682f302e782f67726170682f62616467652e7376673f746f6b656e3d65384238316c376d7a41)](https://codecov.io/gh/digitalcz/oidc-discovery)

PHP implementation of [https://openid.net/specs/openid-connect-discovery-1\_0.html](https://openid.net/specs/openid-connect-discovery-1_0.html)

Install
-------

[](#install)

Via [Composer](https://getcomposer.org/)

```
$ composer require digitalcz/oidc-discovery
```

Usage
-----

[](#usage)

If `php-http/discovery` package is present, DiscoveryFactory will use it to find PSR18 client and PSR17 factory.

```
use DigitalCz\OpenIDConnect\Discovery\DiscovererFactory;

$discoverer = DiscovererFactory::create()
$providerMetadata = $discoverer->discover('https://accounts.google.com/.well-known/openid-configuration');
$issuer = $providerMetadata->issuer(); // https://accounts.google.com
$tokenEndpoint = $providerMetadata->tokenEndpoint(); // https://oauth2.googleapis.com/token
```

otherwise, you can provide these manually

```
use DigitalCz\OpenIDConnect\Discovery\DiscovererFactory;
use Http\Client\Curl\Client;
use Nyholm\Psr7\Factory\Psr17Factory;

$client = new Client();
$requestFactory = new Psr17Factory();
$discoverer = DiscovererFactory::create($client, $requestFactory);
```

### Add cache to avoid unnecessary calls

[](#add-cache-to-avoid-unnecessary-calls)

```
use DigitalCz\OpenIDConnect\Discovery\DiscovererFactory;
use Symfony\Component\Cache\Adapter\FilesystemAdapter
use Symfony\Component\Cache\Psr16Cache;

$cache = new Psr16Cache(new FilesystemAdapter())
$discoverer = DiscovererFactory::create(cache: $cache, cacheTtl: 1800);
```

See [examples](examples) for more

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer csfix    # fix codestyle
$ composer checks   # run all checks

# or separately
$ composer tests    # run phpunit
$ composer phpstan  # run phpstan
$ composer cs       # run codesniffer
```

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

[](#contributing)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Digital Solutions s.r.o.](https://github.com/digitalcz)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

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 ~4 days

Total

3

Last Release

1640d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cdd1a59b82ee65304942a9e50a35ed1628b43db456088c334e73f8e80db9237?d=identicon)[spajxo](/maintainers/spajxo)

![](https://avatars.githubusercontent.com/u/19805238?v=4)[DigitalCz](/maintainers/digitalcz)[@digitalcz](https://github.com/digitalcz)

---

Top Contributors

[![spajxo](https://avatars.githubusercontent.com/u/12384486?v=4)](https://github.com/spajxo "spajxo (9 commits)")

---

Tags

phpOpenIdoidcoidc discovery

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/digitalcz-oidc-discovery/health.svg)

```
[![Health](https://phpackages.com/badges/digitalcz-oidc-discovery/health.svg)](https://phpackages.com/packages/digitalcz-oidc-discovery)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k18.5M1.6k](/packages/cakephp-cakephp)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[facile-it/php-openid-client

OpenID (OIDC) Client

42592.7k7](/packages/facile-it-php-openid-client)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

184616.9k31](/packages/laudis-neo4j-php-client)[neos/flow

Flow Application Framework

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

Flow packages in a joined repository for pull requests.

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

PHPackages © 2026

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