Skip to content

Commit

Permalink
Merge pull request #76 from dominic-ks/firebase-jwt-6.3-update
Browse files Browse the repository at this point in the history
Updated firebase/jwt to 6.3.
  • Loading branch information
dominic-ks committed Oct 2, 2022
2 parents ac10f14 + 45045d9 commit f23f847
Show file tree
Hide file tree
Showing 6 changed files with 2,286 additions and 15 deletions.
12 changes: 4 additions & 8 deletions .gitignore
@@ -1,9 +1,5 @@
.vscode/

node_modules/
package-lock.json

vendor/
composer.lock

/.vscode
/node_modules
/vendor
/.phpunit.result.cache
/package-lock.json
3 changes: 2 additions & 1 deletion class-auth.php
Expand Up @@ -15,6 +15,7 @@
use WP_REST_Server;

use Firebase\JWT\JWT;
use Firebase\JWT\Key;

/**
* The public-facing functionality of the plugin.
Expand Down Expand Up @@ -407,7 +408,7 @@ public function validate_token( $return_response = true ) {
// Try to decode the token.
try {
$alg = $this->get_alg();
$payload = JWT::decode( $token, $secret_key, array( $alg ) );
$payload = JWT::decode( $token, new Key( $secret_key , $alg ));

// The Token is decoded now validate the iss.
if ( $payload->iss !== $this->get_iss() ) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -15,7 +15,7 @@
],
"minimum-stability": "stable",
"require": {
"firebase/php-jwt": "^5.2"
"firebase/php-jwt": "^6.3"
},
"require-dev": {
"php": ">=7.4",
Expand Down

0 comments on commit f23f847

Please sign in to comment.