sizeg / yii2-jwt

A simple Yii2 component to work with JSON Web Token and JSON Web Signature
https://jwt.io/
196 stars 85 forks source link

Invalid Argumet exception while parsing invalid JWT #3

Closed AnatolyRugalev closed 8 years ago

AnatolyRugalev commented 8 years ago

Doesn't component must handle exceptions of JWT Parser? I got this error while parsing invalid JWT:

exception 'InvalidArgumentException' with message 'The JWT string must have two dots' in /var/www/project/vendor/lcobucci/jwt/src/Parser.php:95
Stack trace:
#0 /var/www/project/vendor/lcobucci/jwt/src/Parser.php(59): Lcobucci\JWT\Parser->splitJwt('05cdea76-7107-4...')
#1 /var/www/project/vendor/sizeg/yii2-jwt/Jwt.php(77): Lcobucci\JWT\Parser->parse('05cdea76-7107-4...')

This produces 500 error in my rest interface