ForcePilot/backend/package/yuxi/channel/adapters/webhook_signature.py
Kris bab30f2715
Some checks failed
Deploy VitePress site to Pages / build (push) Has been cancelled
Ruff Format Check / Ruff Format & Lint (push) Has been cancelled
Deploy VitePress site to Pages / Deploy (push) Has been cancelled
feat:0715
2026-07-15 12:30:58 +08:00

13 lines
432 B
Python

class WebhookSignatureAdapter:
def __init__(self, secret: str | None = None, signature_header: str = "X-Signature") -> None:
self.secret = secret
self.signature_header = signature_header
def compute_signature(self, body: bytes) -> str | None:
return None
def validate(self, body: bytes, signature: str | None) -> bool:
if signature is None:
return True
return False