diff --git a/demo/httpsig.py b/demo/httpsig.py index 98c0647..105ae99 100644 --- a/demo/httpsig.py +++ b/demo/httpsig.py @@ -6,16 +6,17 @@ import base64 import httpx import hashlib -from datetime import datetime -from app import logger -from demo.config import ID - -from dataclasses import dataclass from Crypto.Hash import SHA256 from Crypto.Signature import PKCS1_v1_5 from Crypto.PublicKey import RSA from werkzeug.datastructures import Headers from httpx import Headers as Httpx_headers +from datetime import datetime +from loguru import logger + +from dataclasses import dataclass +from demo.config import ID + @dataclass @@ -158,7 +159,8 @@ class HTTPXSigAuth(httpx.Auth): key_id = f"{ID}#main-key" - sig_value = f'keyId="{key_id}",algorithm="rsa-sha256",headers="{sigheaders}",signature="{sig.decode()}"' # noqa: E501 + sig_value = f'keyId="{key_id}",algorithm="rsa-sha256",\ + headers="{sigheaders}",signature="{sig.decode()}"' logger.debug(f"signed request {sig_value=}") r.headers["signature"] = sig_value yield r