Utility function to perform the server-side of Hawk authentication
Project description
hawk-server-asyncio
Utility function to perform the server-side of Hawk authentication for asyncio HTTP servers
Installation
pip install hawk-server-asyncio
Usage
from hawkserver import authenticate_hawk_header
async def lookup_credentials(id):
# Return {'id': 'some-id', 'key': 'some-secret'} matching credentials,
# or None if credentials can't be found
async def seen_nonce(nonce, id):
# Store nonce, return True if nonce previously seen
error_message, credentials = await 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
Built Distribution
Close
Hashes for hawk-server-asyncio-0.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc11708e76bf6e7a50eace6479d5c805cf06f244c1db6f6d4fbd232e3556412c |
|
MD5 | d8364ec60ec622499c579a2c0ffd8d71 |
|
BLAKE2b-256 | 5e1a509460366d8c3cdb6f6753d98c6460dbdd5ddeef0e72bbaa9c173ee3e6fe |
Close
Hashes for hawk_server_asyncio-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 969eac0aafc5684192a218f84b73b141cbf1653f50f751697fcee0347938ccfe |
|
MD5 | a30bbea7897639ab438dcdf68ce947e3 |
|
BLAKE2b-256 | f05d68577c2c333cd3954f54204654b859c2bf54f17c1326b6d60cd3819ebfbc |