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.
2 parents 0283eab + 222197f commit ab4feadCopy full SHA for ab4fead
Jwt.php
@@ -73,7 +73,12 @@ public function getValidationData($currentTime = null)
73
*/
74
public function loadToken($token, $validate = true, $verify = true)
75
{
76
- $token = $this->getParser()->parse((string)$token);
+ try {
77
+ $token = $this->getParser()->parse((string)$token);
78
+ } catch (\RuntimeException $e) {
79
+ Yii::warning("Invalid JWT provided: " . $e->getMessage(), 'jwt');
80
+ return null;
81
+ }
82
83
if ($validate && !$this->validateToken($token)) {
84
return null;
0 commit comments