src/mandrill-webhook-authenticator.js
function(fullUrl, body, key, signature) {
      var data = fullUrl + sortPostParameters(body);
      var expected = getHash(data, key);
      return expected === signature;
    }
function(fullUrl, body, key, signature) {
      var data = fullUrl + sortPostParameters(body);
      var expected = getHash(data, key);
      return expected === signature;
    }
function ( fullUrl , body , key , signature ) { var data = fullUrl + sortPostParameters ( body ) ; var expected = getHash ( data , key ) ; return expected === signature ; }
Generate the signature from the full url and sorted post data to compart to the one provided.
When mandrill is testing the existence of a url it can send a post request with no events and key set to 'test-webhook'.
@param { string } fullUrl - domain and url of request - should match exactly the url specified in the webhook
@param { string } body - request body
@param { string } key - Mandrill Inbound Webhook auth key
@param { string } signature - signature provided in the 'x-mandrill-signature' header
@returns { boolean } True is signature is valid otherwise false
Generate the signature from the full url and sorted post data to compart to the one provided . When mandrill is testing the existence of a url it can send a post request with no events and key set to test - webhook .