Skip to content
MAC Access Auth plugin for pyramid
Failed to load latest commit information.
.gitignore Add tox support. Oct 4, 2012
CHANGES.txt Bump development version number. Nov 27, 2012 Add tox support. Oct 4, 2012
README.rst Initial commit; code imported from repoze.who.plugins.macauth. Jun 15, 2012 Bump development version number. Nov 27, 2012
tox.ini Support for Python3 via source-level compatibility. Nov 27, 2012



This is a Pyramid authenitcation plugin for MAC Access Authentication:

To access resources using MAC Access Authentication, the client must have obtained a set of MAC 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 "MAC" as follows:

> GET /protected_resource HTTP/1.1
> Host:

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

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

> GET /protected_resource HTTP/1.1
> Host:
> Authorization: MAC 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 MAC credentials:

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

Something went wrong with that request. Please try again.