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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f91da2d577f8c80c969523648ff463ad9070f3112a3b8f126802da549e663e79 |
|
MD5 | 5faa76338082928183419465bab7db36 |
|
BLAKE2b-256 | 572745837b0bc94f20ca686f0b2ebb742b6ccf9b979e32516dcd502466a6f71e |
Close
Hashes for hawk_server_asyncio-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc41e57f5ab3007975fe26729869e3ffce9939937050630d92aac717262bd429 |
|
MD5 | 204a7d47c793ed8e397f0f721b1c1fcd |
|
BLAKE2b-256 | 4e021257515af0efcbc020bc2a825f2a3d759f03bc424781d8c5fcab7abc005c |