Skip to main content

pyramid_hawkauth

Project description

This is a Pyramid authenitcation plugin for Hawk Access Authentication:

https://npmjs.org/package/hawk

To access resources using Hawk Access Authentication, the client must have obtained a set of Hawk credentials including an id and secret key. They use these credentials to make signed requests to the server.

When accessing a protected resource, the server will generate a 401 challenge response with the scheme “Hawk” as follows:

> GET /protected_resource HTTP/1.1
> Host: example.com

< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Hawk

The client will use their Hawk credentials to build a request signature and include it in the Authorization header like so:

> GET /protected_resource HTTP/1.1
> Host: example.com
> Authorization: Hawk id="h480djs93hd8",
>                     ts="1336363200",
>                     nonce="dj83hs9s",
>                     mac="bhCQXTVyfj5cmA9uKkPFx1zeOXM="

< HTTP/1.1 200 OK
< Content-Type: text/plain
<
< For your eyes only:  secret data!

This plugin uses the tokenlib library for verifying Hawk credentials:

https://github.com/mozilla-services/tokenlib

If this library does not meet your needs, you can provide a custom callback function to decode the Hawk id token.

v0.1.0 - 2014-13-01

  • Initial release, based on pyramid_macauth codebase.

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

pyramid_hawkauth-0.1.0.tar.gz (10.0 kB view details)

Uploaded Source

File details

Details for the file pyramid_hawkauth-0.1.0.tar.gz.

File metadata

File hashes

Hashes for pyramid_hawkauth-0.1.0.tar.gz
Algorithm Hash digest
SHA256 babbf9c05038ca270553edbde00226b061aa9b348c34808822ea6fc1c948fe94
MD5 3753c626c8ac42d242d286f4bd2f51e3
BLAKE2b-256 d5a304a2a6e837d2824daa83b27befe114c7cbb692ace1b6bc625a017bf31f4b

See more details on using hashes here.

Supported by

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