henderjon / php-oidc
A small, dependency-light OpenID Connect client for PHP.
Package info
Language:HTML
pkg:composer/henderjon/php-oidc
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- firebase/php-jwt: ^7.0
- psr/clock: ^1.0
- psr/log: ^2.0 || ^3.0
- psr/simple-cache: ^2.0 || ^3.0
Requires (Dev)
- donatj/mock-webserver: ^2.10
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^10.5 || ^11.0
This package is auto-updated.
Last update: 2026-08-25 22:33:54 UTC
README
reason
Most OIDC libraries focus on implementing all of the OIDC spec. After using a few of these libraries for simple tasks I found the APIs to have been over built and clumsily at that. This is a library made for how I use OIDC most often as a simple app builder.
The most notable divergence from the library I used previously is the injectable cache mechanism. For the simplest of app, session storage works fine but for [old school] load balanced applications where something like memcache is used to share state across servers, that mechanism needs to be injectable.
installation
Install the package with Composer:
composer require henderjon/php-oidc
See the example application for basic client setup, or the API documentation for the full public API reference (docs/).