apside-top / openid-php-client
A simple library that allows an application to authenticate a user through the basic OpenID Connect flow
v1.0.0
2016-06-27 12:58 UTC
Requires
- php: >=5.2
- ext-curl: *
- ext-json: *
- lcobucci/jwt: ^3.1
This package is not auto-updated.
Last update: 2024-09-28 18:53:21 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");