deed - verify x-hub-signature
The deed Node.js module verifies X-Hub-Signature headers.
example
var deed = require('deed')
, http = require('http')
;
http.createServer(function (req, res) {
deed('secret', req, function (er, req) {
res.end(er ? 'go away' : 'ok')
})
}).listen(1337)
types
cb (er, req)
The callback called when deed is done receives the request if all went well.
er
The error if an error occured or verification failed.req
The verified request.
exports
deed (secret, req, cb)
The sole function exported by the deed module checks if the request body hashed with the secret matches the X-Hub-Signature
header.
secret
The key to hash the payload.req
The request to verify.cb
cb()
Installation
License
ISC License