freshness check rename
This commit is contained in:
parent
90a0f1306b
commit
394f01d84e
|
@ -144,9 +144,9 @@
|
|||
, signature: parts[2] // should remain url-safe base64
|
||||
};
|
||||
}
|
||||
, getFreshness: function (tokenMeta, staletime, now) {
|
||||
, freshness: function (tokenMeta, staletime, _now) {
|
||||
staletime = staletime || (15 * 60);
|
||||
now = now || Date.now();
|
||||
var now = _now || Date.now();
|
||||
var fresh = ((parseInt(tokenMeta.exp, 10) || 0) - Math.round(now / 1000));
|
||||
|
||||
if (fresh >= staletime) {
|
||||
|
|
Loading…
Reference in New Issue