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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aec33cca7ec53d15dc7b5affe6a3924e05810336cf228e961ac51929bca4f3b5 |
|
MD5 | 853cb6be4345a3a7a0806d051bc9cb5e |
|
BLAKE2b-256 | e37b9750c5f782e6e8f2d438db35577992251523d27c1718896252efd68d975d |
Close
Hashes for hawk_server_asyncio-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7788dad26ddea3c890bdb4f82bf7108a16261d1aba89e4345536e2cad058e900 |
|
MD5 | 62c6c1fed1ba22a84135d33159f65872 |
|
BLAKE2b-256 | 50cc6097e7334d854862336d83958f9d215344988d1e42d6e357c264991b3e12 |