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
is_authenticated, error_message, credentials = authenticate_hawk_header(
lookup_credentials, seen_nonce, max_skew,
header, method, host, port, path, content_type, content,
)
if not is_authenticated:
# 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.1.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for hawk_server-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e0ffe5e59f65d56901ab325c66e86a74d7ec62c9785f449ea3020742b1aa69b |
|
MD5 | 3864cf60c6bf21511a915e4cd74e9473 |
|
BLAKE2b-256 | 9b2926c0d5d2005bc05cafe5e4260c12e7249e63d05758d7413244206bb42ae0 |