File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,8 @@ Example encode/decode headers
70
70
Decoding the JWT headers without verifying the JWT first is NOT recommended, and is not supported by
71
71
this library. This is because without verifying the JWT, the header values could have been tampered with.
72
72
Any value pulled from an unverified header should be treated as if it could be any string sent in from an
73
- attacker. If this is something you still want to do in your application for whatever reason, it's possible to
74
- decode the header values manually simply by calling ` json_decode ` and ` base64_decode ` on the JWT
73
+ attacker. If this is something you still want to do in your application for whatever reason, it's possible to
74
+ decode the header values manually simply by calling ` json_decode ` and ` base64_decode ` on the JWT
75
75
header part:
76
76
``` php
77
77
use Firebase\JWT\JWT;
@@ -373,6 +373,8 @@ All exceptions in the `Firebase\JWT` namespace extend `UnexpectedValueException`
373
373
like this:
374
374
375
375
``` php
376
+ use Firebase\JWT\JWT;
377
+ use UnexpectedValueException;
376
378
try {
377
379
$decoded = JWT::decode($payload, $keys);
378
380
} catch (LogicException $e) {
You can’t perform that action at this time.
0 commit comments