[lint] some lint
This commit is contained in:
parent
6b27db30b2
commit
60aa82b63d
1 changed files with 8 additions and 6 deletions
|
@ -6,16 +6,17 @@ import base64
|
||||||
import httpx
|
import httpx
|
||||||
import hashlib
|
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.Hash import SHA256
|
||||||
from Crypto.Signature import PKCS1_v1_5
|
from Crypto.Signature import PKCS1_v1_5
|
||||||
from Crypto.PublicKey import RSA
|
from Crypto.PublicKey import RSA
|
||||||
from werkzeug.datastructures import Headers
|
from werkzeug.datastructures import Headers
|
||||||
from httpx import Headers as Httpx_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
|
@dataclass
|
||||||
|
@ -158,7 +159,8 @@ class HTTPXSigAuth(httpx.Auth):
|
||||||
|
|
||||||
|
|
||||||
key_id = f"{ID}#main-key"
|
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=}")
|
logger.debug(f"signed request {sig_value=}")
|
||||||
r.headers["signature"] = sig_value
|
r.headers["signature"] = sig_value
|
||||||
yield r
|
yield r
|
||||||
|
|
Loading…
Reference in a new issue