PHP code example of everbinding / econnect-psb-php
1. Go to this page and download the library: Download everbinding/econnect-psb-php 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/ */
use Jumbojett\OpenIDConnectClient;
$oidc = new OpenIDConnectClient('https://identity.econnect.eu',
'{clientId}',
'{clientSecret}');
$oidc->addScope('ap');
// Add username and password
$oidc->addAuthParam(array('username'=>'{username}'));
$oidc->addAuthParam(array('password'=>'{password}'));
// to validate the JWT and whether the acces_token property is present
$token = $oidc->requestResourceOwnerToken(TRUE)->access_token;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.