Comparing version 8.0.1 to 9.0.0
'use strict'; | ||
exports.sntp = require('@hapi/sntp'); | ||
exports.server = require('./server'); | ||
@@ -14,4 +12,2 @@ | ||
exports.plugin = require('./plugin'); | ||
exports.uri = { | ||
@@ -18,0 +14,0 @@ authenticate: exports.server.authenticateBewit, |
'use strict'; | ||
const Boom = require('@hapi/boom'); | ||
const Sntp = require('@hapi/sntp'); | ||
@@ -96,5 +95,16 @@ | ||
let _now = Date.now; | ||
// override the `now` function, e.g., to use sntp | ||
exports.setTimeFunction = function (fn) { | ||
_now = fn; | ||
}; | ||
exports.now = function (localtimeOffsetMsec) { | ||
return Sntp.now() + (localtimeOffsetMsec || 0); | ||
return _now() + (localtimeOffsetMsec || 0); | ||
}; | ||
@@ -101,0 +111,0 @@ |
{ | ||
"name": "hawk", | ||
"description": "HTTP Hawk Authentication Scheme", | ||
"version": "8.0.1", | ||
"version": "9.0.0", | ||
"repository": "git://github.com/mozilla/hawk", | ||
@@ -17,11 +17,9 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@hapi/hoek": "9.x.x", | ||
"@hapi/b64": "5.x.x", | ||
"@hapi/boom": "9.x.x", | ||
"@hapi/cryptiles": "5.x.x", | ||
"@hapi/sntp": "4.x.x" | ||
"@hapi/hoek": "9.x.x" | ||
}, | ||
"devDependencies": { | ||
"@hapi/code": "8.x.x", | ||
"@hapi/hapi": "19.x.x", | ||
"@hapi/lab": "22.x.x" | ||
@@ -28,0 +26,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
2
39209
8
866
- Removed@hapi/sntp@4.x.x
- Removed@hapi/bounce@2.0.0(transitive)
- Removed@hapi/sntp@4.0.0(transitive)
- Removed@hapi/teamwork@4.0.0(transitive)