-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from geekwright/jwtupdates
Update to firebase/php-jwt 6.0.0
- Loading branch information
Showing
4 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
namespace Xmf\Jwt; | ||
|
||
use Firebase\JWT\JWT; | ||
use Firebase\JWT\Key; | ||
use Xmf\Key\KeyAbstract; | ||
|
||
/** | ||
|
@@ -20,7 +21,7 @@ | |
* @category Xmf\Jwt\JsonWebToken | ||
* @package Xmf | ||
* @author Richard Griffith <[email protected]> | ||
* @copyright 2018 XOOPS Project (https://xoops.org) | ||
* @copyright 2018-2023 XOOPS Project (https://xoops.org) | ||
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) | ||
* @link https://xoops.org | ||
*/ | ||
|
@@ -80,9 +81,8 @@ public function setAlgorithm($algorithm) | |
*/ | ||
public function decode($jwtString, $assertClaims = array()) | ||
{ | ||
$allowedAlgorithms = array($this->algorithm); | ||
try { | ||
$values = JWT::decode($jwtString, $this->key->getVerifying(), $allowedAlgorithms); | ||
$values = JWT::decode($jwtString, new Key($this->key->getVerifying(), $this->algorithm)); | ||
} catch (\Exception $e) { | ||
trigger_error($e->getMessage(), E_USER_NOTICE); | ||
return false; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,14 +14,14 @@ | |
use Xmf\Random; | ||
|
||
/** | ||
* Xmf\Key\StorageInterface | ||
* Xmf\Key\Basic | ||
* | ||
* load a database table | ||
* a basic general purpose key | ||
* | ||
* @category Xmf\Key\Basic | ||
* @package Xmf | ||
* @author Richard Griffith <[email protected]> | ||
* @copyright 2018 XOOPS Project (https://xoops.org) | ||
* @copyright 2018-2023 XOOPS Project (https://xoops.org) | ||
* @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) | ||
* @link https://xoops.org | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters