File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change 1
1
2
2
PHP-JWT
3
3
=======
4
-
5
4
A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should
6
5
conform to the [ current spec] ( http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06 )
7
6
8
7
Example
9
8
-------
10
-
11
- <?php
12
- include_once 'JWT.php';
13
-
14
- $key = "example_key";
15
- $token = array(
16
- "iss" => "http://example.org",
17
- "aud" => "http://example.com",
18
- "iat" => 1356999524,
19
- "nbf" => 1357000000
20
- );
21
-
22
- $jwt = JWT::encode($token, $key);
23
- $decoded = JWT::decode($jwt, $key);
24
-
25
- print_r($decoded);
26
- ?>
9
+ ``` php
10
+ <?php
11
+ include_once 'JWT.php';
12
+
13
+ $key = "example_key";
14
+ $token = array(
15
+ "iss" => "http://example.org",
16
+ "aud" => "http://example.com",
17
+ "iat" => 1356999524,
18
+ "nbf" => 1357000000
19
+ );
20
+
21
+ $jwt = JWT::encode($token, $key);
22
+ $decoded = JWT::decode($jwt, $key);
23
+
24
+ print_r($decoded);
25
+ ?>
26
+ ```
27
27
28
28
License
29
29
-------
You can’t perform that action at this time.
0 commit comments