Skip to content

Instantly share code, notes, and snippets.

@sandeepshetty
Created June 11, 2012 21:49
Show Gist options
  • Save sandeepshetty/2912961 to your computer and use it in GitHub Desktop.
Save sandeepshetty/2912961 to your computer and use it in GitHub Desktop.
shopify_oauth_is_valid_signature()
<?php
function shopify_oauth_is_valid_signature($shared_secret, $shop, $signature, $timestamp)
{
// TODO: make sure the request isn't more than a day old to avoid replay attacks
return (md5("{$shared_secret}shop={$shop}timestamp={$timestamp}") === $signature);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment