[feat] auth flow
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
SouthFox 2023-07-27 20:30:02 +08:00
parent 6c770286c5
commit 4ee00bad59

View file

@ -15,7 +15,7 @@ from datetime import datetime
from loguru import logger from loguru import logger
from dataclasses import dataclass from dataclasses import dataclass
from demo.config import ID from demo.config import ID, KEY_PATH
@ -165,3 +165,8 @@ class HTTPXSigAuth(httpx.Auth):
logger.debug(f"signed request {sig_value=}") logger.debug(f"signed request {sig_value=}")
request.headers["signature"] = sig_value request.headers["signature"] = sig_value
yield request yield request
k = KEY_PATH.read_text()
k = RSA.importKey(k)
auth = HTTPXSigAuth(k)