[feat] auth flow
This commit is contained in:
parent
6c770286c5
commit
4ee00bad59
1 changed files with 6 additions and 1 deletions
|
@ -15,7 +15,7 @@ from datetime import datetime
|
|||
from loguru import logger
|
||||
|
||||
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=}")
|
||||
request.headers["signature"] = sig_value
|
||||
yield request
|
||||
|
||||
|
||||
k = KEY_PATH.read_text()
|
||||
k = RSA.importKey(k)
|
||||
auth = HTTPXSigAuth(k)
|
||||
|
|
Loading…
Reference in a new issue