Skip to content

Commit

Permalink
Merge pull request #11 from privacybydesign/dependabot/composer/fireb…
Browse files Browse the repository at this point in the history
…ase/php-jwt-6.0.0

Bump firebase/php-jwt from 3.0.0 to 6.0.0
  • Loading branch information
ivard authored Sep 18, 2023
2 parents e892bfc + 9bc9dea commit f38d41c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "IRMA demos",
"type": "project",
"require": {
"firebase/php-jwt": "3.0.0"
"firebase/php-jwt": "6.0.0"
},
"license": "Apache",
"authors": [
Expand Down
31 changes: 19 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 f38d41c

Please sign in to comment.