Skip to content

Commit

Permalink
Chore: apply breaking change in JWT dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
ivard committed Sep 15, 2023
1 parent ed1e0e5 commit 9bc9dea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion get_session_request.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
require_once 'config.php';

use \Firebase\JWT\JWT;
use \Firebase\JWT\Key;

function get_session_request($contents)
{
if (JWT_ENABLED) {
$jwt_pk = file_get_contents(IRMA_SERVER_PUBLICKEY);
try {
$decoded = JWT::decode($contents, $jwt_pk, array('RS256'));
$decoded = JWT::decode($contents, new Key($jwt_pk, 'RS256'));
} catch (Exception $e) {
error_log("JWT could not be parsed: " . $e);
header("HTTP/1.0 403 Forbidden");
Expand Down

0 comments on commit 9bc9dea

Please sign in to comment.