Skip to main content

Signs and validates HTTP requests based on a shared-secret HMAC signature

Project description

# hmac_authentication Python package

Signs and authenticates HTTP requests based on a shared-secret HMAC signature.

Developed in parallel with the following packages for other languages: - Go: [github.com/18F/hmacauth](https://github.com/18F/hmacauth/) - Ruby: [hmac_authentication](https://rubygems.org/gems/hmac_authentication) - Node.js: [hmac-authentication](https://www.npmjs.com/package/hmac-authentication)

## Installation

`sh $ pip install hmac-authentication `

## Validating incoming requests

Inject something resembling the following code fragment into your request handling logic as the first thing that happens before the request body is parsed, where headers is a list of headers factored into the signature and secret_key is the shared secret between your application and the service making the request:

_…coming soon…_

## Signing outgoing requests

_…coming soon…_

## Running tests

`sh $ pip install nose $ nosetests `

## Public domain

This project is in the worldwide [public domain](LICENSE.md). As stated in [CONTRIBUTING](CONTRIBUTING.md):

> This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/). > > All contributions to this project will be released under the CC0 >dedication. By submitting a pull request, you are agreeing to comply >with this waiver of copyright interest.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hmac_authentication-0.0.0.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file hmac_authentication-0.0.0.tar.gz.

File metadata

File hashes

Hashes for hmac_authentication-0.0.0.tar.gz
Algorithm Hash digest
SHA256 d4b10f76e15558b4305afaf69cae7ce505783530b31340a7ebcaaace6aa85bab
MD5 9dda2eef7abd86cbdb1cd067f7201621
BLAKE2b-256 8d669d0af37770542a250f6f80605e46be3e347494f6eda4f9f95a4cf86aacbc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page