Skip to content

Commit 72de317

Browse files
SachinBahukhandishenkimaro
authored andcommitted
chore(docs): add missing imports for example in README (firebase#507)
1 parent 5dde44d commit 72de317

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ Example encode/decode headers
7171
Decoding the JWT headers without verifying the JWT first is NOT recommended, and is not supported by
7272
this library. This is because without verifying the JWT, the header values could have been tampered with.
7373
Any value pulled from an unverified header should be treated as if it could be any string sent in from an
74-
attacker. If this is something you still want to do in your application for whatever reason, it's possible to
75-
decode the header values manually simply by calling `json_decode` and `base64_decode` on the JWT
74+
attacker. If this is something you still want to do in your application for whatever reason, it's possible to
75+
decode the header values manually simply by calling `json_decode` and `base64_decode` on the JWT
7676
header part:
7777
```php
7878
use Firebase\JWT\JWT;
@@ -377,6 +377,8 @@ All exceptions in the `Firebase\JWT` namespace extend `UnexpectedValueException`
377377
like this:
378378

379379
```php
380+
use Firebase\JWT\JWT;
381+
use UnexpectedValueException;
380382
try {
381383
$decoded = JWT::decode($payload, $keys);
382384
} catch (LogicException $e) {

0 commit comments

Comments
 (0)