Skip to content

Commit bc324de

Browse files
glaandbshaffer
authored andcommitted
Clearer variable name in README (#229)
1 parent 8228431 commit bc324de

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
@@ -23,7 +23,7 @@ Example
2323
use \Firebase\JWT\JWT;
2424

2525
$key = "example_key";
26-
$token = array(
26+
$payload = array(
2727
"iss" => "http://example.org",
2828
"aud" => "http://example.com",
2929
"iat" => 1356999524,
@@ -36,7 +36,7 @@ $token = array(
3636
* https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40
3737
* for a list of spec-compliant algorithms.
3838
*/
39-
$jwt = JWT::encode($token, $key);
39+
$jwt = JWT::encode($payload, $key);
4040
$decoded = JWT::decode($jwt, $key, array('HS256'));
4141

4242
print_r($decoded);
@@ -93,14 +93,14 @@ ehde/zUxo6UvS7UrBQIDAQAB
9393
-----END PUBLIC KEY-----
9494
EOD;
9595

96-
$token = array(
96+
$payload = array(
9797
"iss" => "example.org",
9898
"aud" => "example.com",
9999
"iat" => 1356999524,
100100
"nbf" => 1357000000
101101
);
102102

103-
$jwt = JWT::encode($token, $privateKey, 'RS256');
103+
$jwt = JWT::encode($payload, $privateKey, 'RS256');
104104
echo "Encode:\n" . print_r($jwt, true) . "\n";
105105

106106
$decoded = JWT::decode($jwt, $publicKey, array('RS256'));

0 commit comments

Comments
 (0)