PHP code example of packbackbooks / lti-1p3-tool

1. Go to this page and download the library: Download packbackbooks/lti-1p3-tool 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/ */

    

packbackbooks / lti-1p3-tool example snippets


Firebase\JWT\JWT::$leeway = 5;

use Packback\Lti1p3\JwksEndpoint;

// From issuer
JwksEndpoint::fromIssuer($database, 'http://example.com')->getPublicJwks();
// From registration
JwksEndpoint::fromRegistration($registration)->getPublicJwks();
// From array
JwksEndpoint::new(['a_unique_KID' => file_get_contents('/path/to/private/key.pem')])->getPublicJwks();