Skip to content

Commit

Permalink
fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzhao committed Nov 6, 2024
1 parent a062bef commit 3bd42ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions livekit-api/livekit/api/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def __init__(self, token_verifier: TokenVerifier):

def receive(self, body: str, auth_token: str) -> proto_webhook.WebhookEvent:
claims = self._verifier.verify(auth_token)
if claims.sha256 is None:
raise Exception("sha256 was not found in the token")

body_hash = hashlib.sha256(body.encode()).digest()
claims_hash = base64.b64decode(claims.sha256)
Expand Down

0 comments on commit 3bd42ce

Please sign in to comment.