Created
June 11, 2012 21:49
-
-
Save sandeepshetty/2912961 to your computer and use it in GitHub Desktop.
shopify_oauth_is_valid_signature()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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