lib/mailgun-verify.js
function verifyMailgun(apikey, token, timestamp, signature) {
  var data = [timestamp, token].join('');
  var hmac = crypto.createHmac('sha256', apikey).update(data);
  var ourSig = hmac.digest('hex');

  var output = {
    apikey: apikey,
    token: token,
    timestamp: timestamp,
    signature: signature,
    generatedSignature: ourSig,
    valid: ourSig === signature
  };

  return output;
}
function verifyMailgun(apikey, token, timestamp, signature) {
  var data = [timestamp, token].join('');
  var hmac = crypto.createHmac('sha256', apikey).update(data);
  var ourSig = hmac.digest('hex');

  var output = {
    apikey: apikey,
    token: token,
    timestamp: timestamp,
    signature: signature,
    generatedSignature: ourSig,
    valid: ourSig === signature
  };

  return output;
}
function verifyMailgun ( apikey , token , timestamp , signature ) { var data = [ timestamp , token ] . join ( '' ) ; var hmac = crypto . createHmac ( 'sha256' , apikey ) . update ( data ) ; var ourSig = hmac . digest ( 'hex' ) ; var output = { apikey : apikey , token : token , timestamp : timestamp , signature : signature , generatedSignature : ourSig , valid : ourSig === signature } ; return output ; }
Verify mailgun HMAC authentication token
Verify mailgun HMAC authentication token