Skip to content

Commit 3bd42ce

Browse files
committed
fix type check
1 parent a062bef commit 3bd42ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

livekit-api/livekit/api/webhook.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ def __init__(self, token_verifier: TokenVerifier):
1111

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

1517
body_hash = hashlib.sha256(body.encode()).digest()
1618
claims_hash = base64.b64decode(claims.sha256)

0 commit comments

Comments
 (0)