Skip to content

Commit b650dbc

Browse files
committed
Update README.md
fixing typo on JWT Decode parameter from $payload to $jwt
1 parent 76808fa commit b650dbc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ $jwks = ['keys' => []];
290290

291291
// JWK::parseKeySet($jwks) returns an associative array of **kid** to Firebase\JWT\Key
292292
// objects. Pass this as the second parameter to JWT::decode.
293-
JWT::decode($payload, JWK::parseKeySet($jwks));
293+
JWT::decode($jwt, JWK::parseKeySet($jwks));
294294
```
295295

296296
Using Cached Key Sets
@@ -349,7 +349,7 @@ use InvalidArgumentException;
349349
use UnexpectedValueException;
350350

351351
try {
352-
$decoded = JWT::decode($payload, $keys);
352+
$decoded = JWT::decode($jwt, $keys);
353353
} catch (InvalidArgumentException $e) {
354354
// provided key/key-array is empty or malformed.
355355
} catch (DomainException $e) {
@@ -379,7 +379,7 @@ like this:
379379
use Firebase\JWT\JWT;
380380
use UnexpectedValueException;
381381
try {
382-
$decoded = JWT::decode($payload, $keys);
382+
$decoded = JWT::decode($jwt, $keys);
383383
} catch (LogicException $e) {
384384
// errors having to do with environmental setup or malformed JWT Keys
385385
} catch (UnexpectedValueException $e) {
@@ -394,7 +394,7 @@ instead, you can do the following:
394394

395395
```php
396396
// return type is stdClass
397-
$decoded = JWT::decode($payload, $keys);
397+
$decoded = JWT::decode($jwt, $keys);
398398

399399
// cast to array
400400
$decoded = json_decode(json_encode($decoded), true);

0 commit comments

Comments
 (0)