diff options
author | Anant Narayanan <anant@kix.in> | 2012-12-31 16:28:13 -0800 |
---|---|---|
committer | Anant Narayanan <anant@kix.in> | 2012-12-31 16:28:13 -0800 |
commit | 696fd27a4a23ceef95abde8bbf9dd2b069ff0f4e (patch) | |
tree | fbfe92e1f85b3a5c9950ae48063e1ec687080b8a | |
parent | 24b07575613a1bea9615693d6dfa4636679c2b8f (diff) | |
download | php-jwt-696fd27a4a23ceef95abde8bbf9dd2b069ff0f4e.zip php-jwt-696fd27a4a23ceef95abde8bbf9dd2b069ff0f4e.tar.gz php-jwt-696fd27a4a23ceef95abde8bbf9dd2b069ff0f4e.tar.bz2 |
Add README and package file
-rw-r--r-- | JWT-0.1.0.tgz | bin | 0 -> 2981 bytes | |||
-rw-r--r-- | README.md | 30 | ||||
-rw-r--r-- | package.xml | 2 |
3 files changed, 31 insertions, 1 deletions
diff --git a/JWT-0.1.0.tgz b/JWT-0.1.0.tgz Binary files differnew file mode 100644 index 0000000..f06c82c --- /dev/null +++ b/JWT-0.1.0.tgz diff --git a/README.md b/README.md new file mode 100644 index 0000000..90d6bf9 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ + +PHP-JWT +======= + +A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should +conform to the [current spec](http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06) + +Example +------- + + <?php + include_once 'JWT.php'; + + $key = "example_key"; + $token = array( + "iss" => "http://example.org", + "aud" => "http://example.com", + "iat" => 1356999524, + "nbf" => 1357000000 + ); + + $jwt = JWT::encode($token, $key); + $decoded = JWT::decode($jwt, $key); + + print_r($decoded); + ?> + +License +------- +[3-Clause BSD](http://opensource.org/licenses/BSD-3-Clause). diff --git a/package.xml b/package.xml index 02b5c18..9ec07e9 100644 --- a/package.xml +++ b/package.xml @@ -15,7 +15,7 @@ </lead> <lead> <name>Anant Narayanan</name> - <user>anant</usr> + <user>anant</user> <email>anant@php.net</email> <active>yes</active> </lead> |