PHP code example of apside-top / openid-php-client
1. Go to this page and download the library: Download apside-top/openid-php-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
apside-top / openid-php-client example snippets
$oidc = new OpenIDConnectClient('https://id.provider.com/',
'ClientIDHere',
'ClientSecretHere');
$oidc->authenticate();
$name = $oidc->requestUserInfo('given_name');
// Configure a proxy
$oidc->setHttpProxy("http://my.proxy.com:80/");
// Configure a cert
$oidc->setCertPath("/path/to/my.cert");