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 hawkserver
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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c83b175d4ae8a0da7396187a008c30b11229a862380e343fa75027f8a647c1fa |
|
MD5 | bc0b95e0f303203cadc99a54459b3aa3 |
|
BLAKE2b-256 | ee00e0dd7dd9196a1f36f319c36f24c51953306ff57ef03cfb4b26bd8527c943 |
Close
Hashes for hawk_server_asyncio-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffa31d1ce55bd44dd50976273bffb6caab414de1a3b808011230cb436739c943 |
|
MD5 | d97613d89c5db62202d9e611dde6be73 |
|
BLAKE2b-256 | d9b336622e4f72b2dc5781994d400a34025d801e57fa8ae91035ce34829515f4 |