From 87b4c18675cd5363440aad5c9b87eaa99e915d67 Mon Sep 17 00:00:00 2001 From: petrgala Date: Tue, 14 Mar 2023 14:39:28 +0100 Subject: [PATCH] - aktualizace firebase/php-jwt - priznana zavislost na ext-openssl - uprava tokenizeru dle nove verze --- .gitignore | 1 + composer.json | 3 ++- src/Tokenizer/AsymetricJwtTokenizer.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 987e2a2..5a2f04b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ composer.lock vendor +.idea/ diff --git a/composer.json b/composer.json index cfbcbff..ee302ac 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,9 @@ ], "require": { "php": ">=7.4", + "ext-openssl": "*", "nette/di": "^3.0", - "firebase/php-jwt": "~5.0" + "firebase/php-jwt": "^v6.4" }, "require-dev": { "pd/coding-standard": "^1.27", diff --git a/src/Tokenizer/AsymetricJwtTokenizer.php b/src/Tokenizer/AsymetricJwtTokenizer.php index 5bfb67a..9c04d2f 100644 --- a/src/Tokenizer/AsymetricJwtTokenizer.php +++ b/src/Tokenizer/AsymetricJwtTokenizer.php @@ -38,7 +38,7 @@ public function create(\Pd\PublicAccess\PublicAccess $object): string public function decode(string $token): \stdClass { /** @var \stdClass $decode */ - $decode = \Firebase\JWT\JWT::decode($token, $this->publicKey, [self::ALGORITHM]); + $decode = \Firebase\JWT\JWT::decode($token, new \Firebase\JWT\Key($this->publicKey, self::ALGORITHM)); return $decode; }