Skip to content

Commit 150ca03

Browse files
authored
TA-1964: Upgrade Firebase PHP-JWT (#32)
* TA-1964: Upgrade Firebase PHP-JWT * add in composer.lock and standard ubuntu image * add composer.lock back to gitignore * Delete composer.lock * bump version
1 parent e29666e commit 150ca03

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM talis/ubuntu:1404-latest
1+
FROM ubuntu:trusty
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "talis/talis-php",
33
"description": "This is a php client library for talis APIs",
4-
"version": "0.7.0",
4+
"version": "0.8.0",
55
"keywords": [
66
"persona",
77
"echo",
@@ -22,7 +22,7 @@
2222
"ext-hash": "*",
2323
"ext-openssl": "*",
2424
"doctrine/common": "^2.5",
25-
"firebase/php-jwt": "^3.0",
25+
"firebase/php-jwt": "^6.0",
2626
"guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
2727
"monolog/monolog": ">=1.13.1",
2828
"predis/predis": ">=0.8.5",

src/Talis/Persona/Client/Tokens.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Talis\Persona\Client;
44

55
use Firebase\JWT\JWT;
6+
use Firebase\JWT\Key;
67
use Talis\Persona\Client\ScopesNotDefinedException;
78
use Talis\Persona\Client\EmptyResponseException;
89
use Talis\Persona\Client\InvalidPublicKeyException;
@@ -124,7 +125,7 @@ protected function decodeToken($token, $rawPublicCert)
124125
$pubCert = openssl_pkey_get_public($rawPublicCert);
125126

126127
if ($pubCert) {
127-
return (array) JWT::decode($token, $pubCert, ['RS256']);
128+
return (array) JWT::decode($token, new Key($pubCert, 'RS256'));
128129
}
129130

130131
$this->getLogger()->error('Invalid public key');

0 commit comments

Comments
 (0)