Skip to content

Commit

Permalink
Merge pull request #10 from peckadesign/aktualizace_firebase_jwt
Browse files Browse the repository at this point in the history
Aktualizace firebase/php-jwt
  • Loading branch information
Petr Gala authored Mar 14, 2023
2 parents ad824ed + 4cda1fc commit 5ddf88d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
composer.lock
vendor
.idea/
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -28,5 +29,10 @@
"psr-4": {
"Pd\\PublicAccess\\": "src/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
2 changes: 1 addition & 1 deletion src/Tokenizer/AsymetricJwtTokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5ddf88d

Please sign in to comment.