We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d0fb6c commit 2e542a5Copy full SHA for 2e542a5
encode.php
@@ -5,6 +5,11 @@
5
use \Firebase\JWT\SignatureInvalidException;
6
$key = '83aeee518617ad6f3393bf0685e37d3e';
7
8
+// plain text
9
+$data = "Hello, World!";
10
+$jwt = JWT::encode($data, $key, 'HS256');
11
+print $jwt."\n";
12
+
13
// JSON
14
$data=[
15
"status"=>"success",
@@ -17,8 +22,3 @@
17
22
$data = json_encode($data);
18
23
$jwt = JWT::encode($data, $key, 'HS256');
19
24
print $jwt."\n";
20
-
21
-// plain text
-$data = "Hello, World!";
-$jwt = JWT::encode($data, $key, 'HS256');
-print $jwt."\n";
0 commit comments