const HTTP_SIGNATURE = {
HEADER_NAME: 'signature',
ALGORITHM: 'rsa-sha256',
- HEADERS_TO_SIGN: [ '(request-target)', 'host', 'date', 'digest' ]
+ HEADERS_TO_SIGN: [ '(request-target)', 'host', 'date', 'digest' ],
+ CLOCK_SKEW_SECONDS: 1800
}
// ---------------------------------------------------------------------------
const sig = req.headers[HTTP_SIGNATURE.HEADER_NAME] as string
if (sig && sig.startsWith('Signature ') === false) req.headers[HTTP_SIGNATURE.HEADER_NAME] = 'Signature ' + sig
- const parsed = parseHTTPSignature(req)
+ const parsed = parseHTTPSignature(req, HTTP_SIGNATURE.CLOCK_SKEW_SECONDS)
const keyId = parsed.keyId
if (!keyId) {