Hawk is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial HTTP request cryptographic verification.
PyHawk is great for consuming or providing webservices from Python.
This is under development, ready for adventurous users. There doesn't appear to be a Python library for HAWK. Let me know if there is already a robust library.
The tests/server directory has a server.js and a client.js (Node code) which are from HAWK's usage.js.
To test the server, do the following:
- python sample_server.py
- cd tests/server
- node client.js
Output should be
authenticated request was: 200: Hello dh37fgj492je and welcome! (valid) Unauthenticated request was 401: Please authenticate
Note: the port numbers in test_pyhawk.py and client.js must match.
To test the client, do the following:
- cd tests/server
- node server.js
- cd ../..
- python sample_client.py
Output should be
200 Hello Steve and welcome!
Iterate on a python library until it can communicate with the test client/server.
- ✓ Write Server API
- ✓ Write client API
- ✓ Switch to callback style
- Improve code style
- Make API elegant
Client and Server APIs are working according to the Node.js implementation. W00t!
Please file issues for code style, bugs, etc.