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
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
is_authenticated, error_message, credentials = await 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
Built Distribution
Close
Hashes for hawk-server-asyncio-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2d028c1d82ee3f0c409d1a91f8bfb735459972487cd5c0de590301a61cb411b |
|
MD5 | 0a93714e0694449deb6e2e331195aa31 |
|
BLAKE2b-256 | ec130578a37f066e11a47e2e078b011b9b4fc8ee38be3fd8aa026fa3c14f30e3 |
Close
Hashes for hawk_server_asyncio-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4c587ae6560a17c09dbbf7bc096e5ff4ca1495195cf58517ebd08f2623563d6 |
|
MD5 | c86ecf0f8989905fe2e61229a07ba756 |
|
BLAKE2b-256 | efcedc2b5fc4375bf0582085a1ad73b1c373a49cf614d644d637dfb97eb5c9aa |