diff options
author | Luis Miguel Cabral <luis.miguel.cabral@pearson.com> | 2015-05-11 12:20:39 +0200 |
---|---|---|
committer | Luis Miguel Cabral <luis.miguel.cabral@pearson.com> | 2015-05-11 12:20:39 +0200 |
commit | 95fa9ae8ff71e3fc697befda39d9530cc15e5e8e (patch) | |
tree | 0731bdbf757345a466484ffa50639440e44b04c3 /README.md | |
parent | 61ff1780af6a0200f18711d897a52eb1aa53729d (diff) | |
download | php-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.md | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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')); + ?> ``` |