Skip to content

Commit 6c8f5e7

Browse files
chore(docs): add missing imports for example in README (#507)
1 parent e94e735 commit 6c8f5e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ Example encode/decode headers
7070
Decoding the JWT headers without verifying the JWT first is NOT recommended, and is not supported by
7171
this library. This is because without verifying the JWT, the header values could have been tampered with.
7272
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
7575
header part:
7676
```php
7777
use Firebase\JWT\JWT;
@@ -373,6 +373,8 @@ All exceptions in the `Firebase\JWT` namespace extend `UnexpectedValueException`
373373
like this:
374374

375375
```php
376+
use Firebase\JWT\JWT;
377+
use UnexpectedValueException;
376378
try {
377379
$decoded = JWT::decode($payload, $keys);
378380
} catch (LogicException $e) {

0 commit comments

Comments
 (0)