Skip to content

Commit 0e112c9

Browse files
committed
Syntax highligh example
1 parent 696fd27 commit 0e112c9

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11

22
PHP-JWT
33
=======
4-
54
A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should
65
conform to the [current spec](http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06)
76

87
Example
98
-------
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-
?>
9+
```php
10+
<?php
11+
include_once 'JWT.php';
12+
13+
$key = "example_key";
14+
$token = array(
15+
"iss" => "http://example.org",
16+
"aud" => "http://example.com",
17+
"iat" => 1356999524,
18+
"nbf" => 1357000000
19+
);
20+
21+
$jwt = JWT::encode($token, $key);
22+
$decoded = JWT::decode($jwt, $key);
23+
24+
print_r($decoded);
25+
?>
26+
```
2727

2828
License
2929
-------

0 commit comments

Comments
 (0)