Metadata-Version: 2.1
Name: hawk-server-asyncio
Version: 0.0.1
Summary: Utility function to perform the server-side of Hawk authentication
Home-page: https://github.com/uktrade/hawk-server-asyncio
Author: Department for International Trade
Author-email: webops@digital.trade.gov.uk
License: UNKNOWN
Description: # hawk-server-asyncio
        
        Utility function to perform the server-side of Hawk authentication
        
        
        ## Installation
        
        ```bash
        pip install hawkserver
        ```
        
        
        ## Usage
        
        ```python
        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):
            # Store nonce, return True if nonce previously seen
        
        is_authenticated, error_message, credentials = authenticate_hawk_header(
            lookup_credentials, seen_nonce,
            header, method, host, port, path, content_type, content,
        )
        if not is_authenticated:
            # Return error or raise exception as needed
        ```
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.7.0
Description-Content-Type: text/markdown
