File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ print_r($claims2); // ['id' => 13, 'is-admin' => true]
305
305
### Error Handling
306
306
307
307
Here are the exceptions that the package might throw:
308
+
308
309
* Encoding:
309
310
* [ InvalidKeyException] ( src/Exceptions/InvalidKeyException.php ) when the provided key is not valid.
310
311
* [ JsonEncodingException] ( src/Exceptions/JsonEncodingException.php ) when cannot convert the provided claims to JSON.
@@ -318,6 +319,9 @@ Here are the exceptions that the package might throw:
318
319
* [ NoKidException] ( src/Exceptions/NoKidException.php ) when there is no ` kid ` in the token header.
319
320
* [ VerifierNotFoundException] ( src/Exceptions/VerifierNotFoundException.php ) when no key/verifier matches the ` kid ` in the token header.
320
321
322
+ All of the exceptions mentioned are subclasses of the ` JwtException ` exception.
323
+ By catching ` JwtException ` , you can handle all these cases collectively instead of catching each one individually.
324
+
321
325
## License
322
326
PHP-JWT is initially created by [ Milad Rahimi] ( http://miladrahimi.com )
323
327
and released under the [ MIT License] ( http://opensource.org/licenses/mit-license.php ) .
You can’t perform that action at this time.
0 commit comments