Skip to content
Verify signed HTTP requests from Manifold
Branch: master
Clone or download
PLaRoche Merge pull request #9 from heliodor/patch-1
Make it clear what the params are
Latest commit e0630e1 Jul 19, 2018

README.md

python-manifoldco-signature

Verify signed HTTP requests from Manifold

Code of Conduct | Contribution Guidelines

GitHub release Travis License

Install

pip install manifoldco-signature

Usage

manifoldco_signature is built to be used with any HTTP handling framework. As such, you'll need to manually pass in request data in the format the Verifier expects.

In particular, header names must be lowercased and hyphen delimited, and query param names and values must be url-encoded.

If you're using a specific HTTP framework and would like native support for it included in this library, file an issue and let us know!

import manifoldco_signature as signature


verifier = signature.Verifier()


method = 'PUT'
path = '/v1/resources'
query = {}  # must be url-encoded
headers = {'host': 'yourdomain.com'}
body = 'request body'
valid =  verifier.verify(method, path, query, headers, body)
if not valid:
    # return unauthorized
You can’t perform that action at this time.