Utility function to perform the server-side of Hawk authentication for asyncio HTTP servers
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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 453a1594eb2e0124ecb4a289806e28fe9e61055da8d8c50f7585caa3202a0e64 |
|
MD5 | 1f4b81c456d0c191369ebe41955a6b0b |
|
BLAKE2b-256 | 65ed295d4213355679bfd9f7f641835727a0ed4eed4b68deda551657b7adc575 |
Close
Hashes for hawk_server_asyncio-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31fda12b5a2007530555538ed55cd9fa2f3247ecb79afc1bb6458d40b8f8703c |
|
MD5 | e7d4b25872233080fae7f642de735c98 |
|
BLAKE2b-256 | 36acd0237bfd84ea72d738f81e6fae177bfcd58e07e52c34eb5693d31290b3f3 |