Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ vendor
.idea
*.iml
clover.xml
.phpunit.result.cache
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"Apple Jwt"
],
"require": {
"php": ">=5.6",
"guzzlehttp/guzzle": "~6.5",
"firebase/php-jwt": "~5.2",
"php": ">=8.1",
"guzzlehttp/guzzle": "~7.15.2",
"firebase/php-jwt": "~7.1.0",
"ext-json": "*",
"ext-openssl": "*"
},
"require-dev": {
"mockery/mockery": "1.3.1",
"phpunit/phpunit": "5.7.27"
"phpunit/phpunit": "8.5.50"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 2 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Exception;
use Firebase\JWT\JWK;
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\RequestOptions;
Expand Down Expand Up @@ -47,7 +48,7 @@ public function __construct(ClientInterface $httpClient, Config $config)
public function verifyAndDecodeJwt($jwtToken)
{
return new JwtVerifyResponse(
JWT::decode($jwtToken, $this->getApplePublicKey(), ['RS256'])
JWT::decode($jwtToken, $this->getApplePublicKey())
);
}

Expand Down
9 changes: 3 additions & 6 deletions test/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@

class ClientTest extends m\Adapter\Phpunit\MockeryTestCase
{
/** @var string */
private $appleJwk;
private string|false $appleJwk;
private string|false $appleJwt;

/** @var string */
private $appleJwt;

protected function setUp()
protected function setUp(): void
{
$this->appleJwk = file_get_contents(__DIR__ . '/data/appleJwk.json');
$this->appleJwt = file_get_contents(__DIR__ . '/data/appleJwt');
Expand Down
4 changes: 2 additions & 2 deletions test/Response/JwtVerifyResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
class JwtVerifyResponseTest extends MockeryTestCase
{
/** @var stdClass */
private $appleJwt;
private mixed $appleJwt;

protected function setUp()
protected function setUp(): void
{
$this->appleJwt = json_decode(file_get_contents(__DIR__ . '/../data/appleJwtDecoded.json'));
parent::setUp();
Expand Down
Loading