<?php 
require __DIR__ . '/vendor/autoload.php';
use Firebase\JWT\JWT;
use Firebase\JWT\Key;

$public_raw = "AIyFUKW3Uzga_yeDwauPAproaZOEzXQJytyLoeW7xiLnx1hN_RmuE8WP4ksd-fZI8OzO7TOXn6f3MKJ-tLw6KhnoWnZhqRPE1jKhQKrwZtP2echgoHnc92_5cQYW-j6pSmSSiUQmnSXADjVqguZfHXjxOvHuO7QRrMEY6zQfXRgXkPLA6b3tBzsHJyzQsOwNyV2Bktc9OfL0kP34IxbD6bI90YlRFKaCMUxtSxrB6JJJzOxUHogVJmtVmGO1ZDDxfuaTHQxvzOPsBlngTMkZBm785uKgu0r8OOJIQQKm5n1wqKO_w3AvnLxi75UC-zC-5RXO4dG5xWlVeSaUroazEMc=";
$publicKey = "-----BEGIN PUBLIC KEY-----\n" . wordwrap($public_raw, 64, "\n",true) . "\n-----END PUBLIC KEY-----\n";

$jwt = "eyJraWQiOiI5OGIwYTgxZi0zODQyLTQ5M2MtYjE0YS01OWZmZTgzMjYwNjgiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ0cml2aWFJZCI6MS4wLCJzdXNJZCI6MTIzNDUuMCwiZW1wcmVzYSI6IkFpZ2VsIn0.ApfKpdqDBN1ab8rOkrkreCVTcu5Eu5SzsX995VOJXROoxGAx2O1K4Jf7zfq9K_7Vge6hdB-_3k3Xw9OPEX9QZaYD7BZzqw7PRgV__6-oeuJKac5fPn1wlbF0uAWaZOY_IneptPPBfMsczPRA-4ffVirwg9Ifp7RwXkmyofaenO2bUwmFqnlgLQT3q1O2YWQY43uzwU3Dj4uc-C104X1AFlaetF3fK_RuEqCeMAwsqySXfvVe_wb4dQSbJimzu00En1KhJwzhSNbgCTB9HfYN8abtTjBG6Zwn6ihm819pzxc_Xd2vK6U5MAn_1Nf-g1N8Oa7jywIrW9KUJDIRr5Re8w";

$decoded = JWT::decode($jwt, new Key($publicKey, 'RS256'));

/*
 NOTE: This will now be an object instead of an associative array. To get
 an associative array, you will need to cast it as such:
*/

$decoded_array = (array) $decoded;
echo "Decode:\n" . print_r($decoded_array, true) . "\n";
?>