diff options
-rw-r--r-- | README.md | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -1,29 +1,29 @@ 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); - ?> +```php +<?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 ------- |