File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change
1
+
2
+ PHP-JWT
3
+ =======
4
+
5
+ A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should
6
+ conform to the [ current spec] ( http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06 )
7
+
8
+ Example
9
+ -------
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
+ ?>
27
+
28
+ License
29
+ -------
30
+ [ 3-Clause BSD] ( http://opensource.org/licenses/BSD-3-Clause ) .
Original file line number Diff line number Diff line change 15
15
</lead >
16
16
<lead >
17
17
<name >Anant Narayanan</name >
18
- <user >anant</usr >
18
+ <user >anant</user >
19
19
20
20
<active >yes</active >
21
21
</lead >
You can’t perform that action at this time.
0 commit comments