function verifyRequest(req, res, buf, encoding) {
    var expected = req.headers['x-hub-signature'];
    var calculated = getSignature(buf);
    if (expected !== calculated) {
      throw new Error('Invalid signature on incoming request');
    } else {
      // facebook_botkit.logger.debug('** X-Hub Verification successful!')
    }
  }
function verifyRequest(req, res, buf, encoding) {
    var expected = req.headers['x-hub-signature'];
    var calculated = getSignature(buf);
    if (expected !== calculated) {
      throw new Error('Invalid signature on incoming request');
    } else {
      
    }
  }
function verifyRequest ( req , res , buf , encoding ) { var expected = req . headers [ 'x-hub-signature' ] ; var calculated = getSignature ( buf ) ; if ( expected !== calculated ) { throw new Error ( 'Invalid signature on incoming request' ) ; } else { // facebook_botkit.logger.debug('** X-Hub Verification successful!') } }
Verifies the SHA1 signature of the raw request payload before bodyParser parses it Will abort parsing if signature is invalid, and pass a generic error to response
Verifies the SHA1 signature of the raw request payload before bodyParser parses it Will abort parsing if signature is invalid and pass a generic error to response