summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnant Narayanan <anant@kix.in>2012-12-31 16:39:20 -0800
committerAnant Narayanan <anant@kix.in>2012-12-31 16:39:20 -0800
commit0e112c9ba6ab931622b076173aeb84b24633de64 (patch)
treec96b6244830bc3c3ba77e697a2ae66cebc646f14
parent696fd27a4a23ceef95abde8bbf9dd2b069ff0f4e (diff)
downloadphp-jwt-0e112c9ba6ab931622b076173aeb84b24633de64.zip
php-jwt-0e112c9ba6ab931622b076173aeb84b24633de64.tar.gz
php-jwt-0e112c9ba6ab931622b076173aeb84b24633de64.tar.bz2
Syntax highligh example
-rw-r--r--README.md36
1 files changed, 18 insertions, 18 deletions
diff --git a/README.md b/README.md
index 90d6bf9..4b60193 100644
--- a/README.md
+++ b/README.md
@@ -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
-------