apside-top / openid-php-client
A simple library that allows an application to authenticate a user through the basic OpenID Connect flow
Installs: 44
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/apside-top/openid-php-client
Requires
- php: >=5.2
- ext-curl: *
- ext-json: *
- lcobucci/jwt: ^3.1
This package is not auto-updated.
Last update: 2025-10-12 01:02:57 UTC
README
A simple library that allows an application to authenticate a user through the basic OpenID Connect flow.
Adapted from jumbojett/OpenID-Connect-PHP created by Michael Jett.
Requirements
- PHP 5.2 or greater
- CURL extension
- JSON extension
Install
- Install library using composer
composer require 'paquet-name'
- Include composer autoloader
require '/vendor/autoload.php';
Example 1 : Basic Client
$oidc = new OpenIDConnectClient('https://id.provider.com/', 'ClientIDHere', 'ClientSecretHere'); $oidc->authenticate(); $name = $oidc->requestUserInfo('given_name');
[See openid spec for available user attributes][1]
Example 3 : Network and Security
// Configure a proxy $oidc->setHttpProxy("http://my.proxy.com:80/"); // Configure a cert $oidc->setCertPath("/path/to/my.cert");