lib/webhooks/webhooks.js
function validateRequest(authToken, twilioHeader, url, params) {
  var expectedSignature = getExpectedTwilioSignature(authToken, url, params);
  return scmp(Buffer.from(twilioHeader), Buffer.from(expectedSignature));
}
function validateRequest(authToken, twilioHeader, url, params) {
  var expectedSignature = getExpectedTwilioSignature(authToken, url, params);
  return scmp(Buffer.from(twilioHeader), Buffer.from(expectedSignature));
}
function validateRequest ( authToken , twilioHeader , url , params ) { var expectedSignature = getExpectedTwilioSignature ( authToken , url , params ) ; return scmp ( Buffer . from ( twilioHeader ) , Buffer . from ( expectedSignature ) ) ; }
Utility function to validate an incoming request is indeed from Twilio

@param {string} authToken - The auth token, as seen in the Twilio portal
@param {string} twilioHeader - The value of the X-Twilio-Signature header from the request
@param {string} url - The full URL (with query string) you configured to handle this request
@param {object} params - the parameters sent with this request
@returns {boolean} - valid
Utility function to validate an incoming request is indeed from Twilio