Skip to content

Instantly share code, notes, and snippets.

View jamesproud's full-sized avatar

James Proud jamesproud

View GitHub Profile
@jamesproud
jamesproud / RequestSigner.py
Created June 10, 2012 07:52 — forked from shreyansb/RequestSigner.py
Sign and verify requests
import hmac
import base64
import hashlib
# simplejson is available at: http://pypi.python.org/pypi/simplejson/
import simplejson as json
class RequestSigner(object):
def verify_and_load_signed_request(self, signed_request, secret):
"""Verify the signature, and return decoded data from a signed_request value"""
try: