PHP code example of scottbass3 / hydra-client-php-psr-18

1. Go to this page and download the library: Download scottbass3/hydra-client-php-psr-18 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/ */

    

scottbass3 / hydra-client-php-psr-18 example snippets





apiInstance = new Scottbass3\Hydra\Client\Api\JwkApi(
    // If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
    // This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
    new GuzzleHttp\Client()
);
$set = 'set_example'; // string | The JSON Web Key Set ID
$createJsonWebKeySet = new \Scottbass3\Hydra\Client\Model\CreateJsonWebKeySet(); // \Scottbass3\Hydra\Client\Model\CreateJsonWebKeySet

try {
    $result = $apiInstance->createJsonWebKeySet($set, $createJsonWebKeySet);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling JwkApi->createJsonWebKeySet: ', $e->getMessage(), PHP_EOL;
}