Closed
Description
The decode method documents the following list of exceptions to decode:
* @throws InvalidArgumentException Provided JWT was empty
* @throws UnexpectedValueException Provided JWT was invalid
* @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed
* @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf'
* @throws BeforeValidException Provided JWT is trying to be used before it's been created as defined by 'iat'
* @throws ExpiredException Provided JWT has since expired, as defined by the 'exp' claim
However, this is incomplete. Providing a malformed payload results in an undocumented DomainException which propagates up the stack from self::jsonDecode
<?php
\Firebase\JWT\JWT::decode('thisobviouslyisnt.validbase64.encodedjson', '123');
=> DomainException
Metadata
Metadata
Assignees
Labels
No labels