Fixes ACCOUNTS-319

This commit is contained in:
ErickSkrauch 2018-01-01 17:12:15 +03:00
parent 33091aaefa
commit 5649c49a57

View File

@ -132,7 +132,11 @@ class Component extends YiiUserComponent {
$token = &self::$parsedTokensCache[$jwtString];
if ($token === null) {
$jwt = new Jwt();
$notVerifiedToken = $jwt->deserialize($jwtString);
try {
$notVerifiedToken = $jwt->deserialize($jwtString);
} catch (Exception $e) {
throw new VerificationException('Incorrect token encoding', 0, $e);
}
$context = new VerificationContext(EncryptionFactory::create($this->getAlgorithm()));
$context->setSubject(self::JWT_SUBJECT_PREFIX);