File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ Example
2323use \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
4242print_r($decoded);
@@ -93,14 +93,14 @@ ehde/zUxo6UvS7UrBQIDAQAB
9393-----END PUBLIC KEY-----
9494EOD;
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');
104104echo "Encode:\n" . print_r($jwt, true) . "\n";
105105
106106$decoded = JWT::decode($jwt, $publicKey, array('RS256'));
You can’t perform that action at this time.
0 commit comments