Utility function to perform the server-side of Hawk authentication
Project description
hawk-server
Utility function to perform the server-side of Hawk authentication
Installation
pip install hawk-server
Usage
from hawkserver import authenticate_hawk_header
def lookup_credentials(id):
# Return {'id': 'some-id', 'key': 'some-secret'} matching credentials,
# or None if credentials can't be found
def seen_nonce(nonce, id):
# Store nonce, return True if nonce previously seen
error_message, credentials = authenticate_hawk_header(
lookup_credentials, seen_nonce, max_skew,
header, method, host, port, path, content_type, content,
)
if error_message is not None:
# Return error or raise exception as needed
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hawk-server-0.0.3.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for hawk_server-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | defc6ab5520a250d63b39d9ea38353647e313bc55200942aef0f71c3ef22f08d |
|
MD5 | 9ed9871bdc80328f1d7320f3fa29aa65 |
|
BLAKE2b-256 | a0980b190a63e81b4c628feeed96fc25db10f86ad992ef27becef2445e2ac3b1 |