Skip to content

Commit

Permalink
Merge pull request #4 from AnatolyRugalev/master
Browse files Browse the repository at this point in the history
Added \InvalidArgumentException handling
  • Loading branch information
sizeg authored Aug 1, 2016
2 parents ab4fead + ab5fc96 commit 1a7ecad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Jwt.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public function loadToken($token, $validate = true, $verify = true)
} catch (\RuntimeException $e) {
Yii::warning("Invalid JWT provided: " . $e->getMessage(), 'jwt');
return null;
} catch (\InvalidArgumentException $e) {
Yii::warning("Invalid JWT provided: " . $e->getMessage(), 'jwt');
return null;
}

if ($validate && !$this->validateToken($token)) {
Expand Down

0 comments on commit 1a7ecad

Please sign in to comment.