summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorLuis Miguel Cabral <luis.miguel.cabral@pearson.com>2015-05-11 12:20:39 +0200
committerLuis Miguel Cabral <luis.miguel.cabral@pearson.com>2015-05-11 12:20:39 +0200
commit95fa9ae8ff71e3fc697befda39d9530cc15e5e8e (patch)
tree0731bdbf757345a466484ffa50639440e44b04c3 /README.md
parent61ff1780af6a0200f18711d897a52eb1aa53729d (diff)
downloadphp-jwt-95fa9ae8ff71e3fc697befda39d9530cc15e5e8e.zip
php-jwt-95fa9ae8ff71e3fc697befda39d9530cc15e5e8e.tar.gz
php-jwt-95fa9ae8ff71e3fc697befda39d9530cc15e5e8e.tar.bz2
Changed the leeway to be a static variable
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index 3c416dc..bda2d96 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,16 @@ print_r($decoded);
$decoded_array = (array) $decoded;
+/**
+ * You can add a leeway to account for when there is a clock skew times between
+ * the signing and verifying servers. It is recomended this leeway should not
+ * be bigger than a few minutes.
+ * Source: http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#nbfDef
+ */
+
+JWT::$leeway = 60;
+$decoded = JWT::decode($jwt, $key, array('HS256'));
+
?>
```