Skip to content

Commit 696fd27

Browse files
committed
Add README and package file
1 parent 24b0757 commit 696fd27

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

JWT-0.1.0.tgz

2.91 KB
Binary file not shown.

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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).

package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</lead>
1616
<lead>
1717
<name>Anant Narayanan</name>
18-
<user>anant</usr>
18+
<user>anant</user>
1919
<email>[email protected]</email>
2020
<active>yes</active>
2121
</lead>

0 commit comments

Comments
 (0)