декодирование jwt не работало < /p>
Неожиданное. />/html/htdocs/mrt_dgheorghe/vendor/firebase/php-jwt/src/jwt.php:477
Код для JWT выглядит как:
Код: Выделить всё
$now = time();
$payload = [
'iss' => $clientId,
'sub' => $apiUserId,
'aud' => 'account-d.docusign.com',
'scope' => 'signature impersonation',
'iat' => $now,
'exp' => $now + 3600 // 1 hour expiration
];
$privateKey = file_get_contents($privateKeyFilePath);
$jwt = JWT::encode($payload, $privateKey, 'RS256', $keypairID); //kid
$publicKey = file_get_contents('publicKey.key');
try
{
$decodedJWT = JWT::decode($jwt,$publicKey);
print_r($decodedJWT);
echo "This is the decoded JWT";
}
catch(Exception $e)
{
echo "Decoding JWT did not work";
print($e);
Подробнее здесь: https://stackoverflow.com/questions/794 ... failing-ki