We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 800729f commit ff788e4Copy full SHA for ff788e4
src/JWTTools.php
@@ -14,6 +14,7 @@
14
use yii\db\ActiveRecord;
15
use yii\helpers\BaseStringHelper;
16
use yii\web\UnauthorizedHttpException;
17
+use Firebase\JWT\Key;
18
19
final class JWTTools
20
{
@@ -137,7 +138,7 @@ public function getJWT(): string
137
138
public function decodeToken(string $token): stdClass
139
140
try {
- return JWT::decode($token, $this->secretKey, [$this->algorithm]);
141
+ return JWT::decode($token, new Key($this->secretKey, $this->algorithm));
142
} catch (\Throwable $e) {
143
throw new UnauthorizedHttpException($e->getMessage());
144
}
0 commit comments