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 servers, with no dependencies other than the Python standard library.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hawk-server-asyncio-0.0.13.tar.gz.
File metadata
- Download URL: hawk-server-asyncio-0.0.13.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eee7cb551599ab1d130637a7c951f784c8a825b021f8ef8e1349b4e13d50fcf9
|
|
| MD5 |
8207cb959818cbd68f48df6968ff1cbe
|
|
| BLAKE2b-256 |
a894998b1553f2e2060f646e2e666b6be8b80599def98b556335b305878d1e5a
|
File details
Details for the file hawk_server_asyncio-0.0.13-py3-none-any.whl.
File metadata
- Download URL: hawk_server_asyncio-0.0.13-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fb62e41ef9b503359009cc02bd760381fd5cde56fc7fe9b4132768871c36dd0
|
|
| MD5 |
648577f2c5e1fa2774186ddea4ae7a2a
|
|
| BLAKE2b-256 |
682422a6d0f0c61a88f4f5e3107f0f2db5b79c8bd063c035cc6c8a449f0bb4b6
|