Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am gavinballard on github.
  • I am gavinballard (https://keybase.io/gavinballard) on keybase.
  • I have a public key ASCUpC7m1tZ3oROkXKKsQTz9EXM_wtV2OwZLJcE0BYUA8Qo

To claim this, I am signing this object:

@gavinballard
gavinballard / proxy_request_verification.py
Created July 18, 2014 15:26
Python methods to verify the signature of a request being sent through a Shopify application proxy.
import hashlib, base64, hmac
def get_proxy_signature(query_dict, secret):
"""
Calculate the signature of the given query dict as per Shopify's documentation for proxy requests.
See: http://docs.shopify.com/api/tutorials/application-proxies#security
"""
# Sort and combine query parameters into a single string.