Skip to content

Commit 608c183

Browse files
committed
MT-22022: Simplify example to happy-path verification only
1 parent f2f05dc commit 608c183

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎examples/webhooks/verify_signature.py‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@
1212
hashlib.sha256,
1313
).hexdigest()
1414

15-
assert mt.verify_signature(payload, signature, signing_secret) is True
16-
17-
# Bad input never raises — it returns False:
18-
assert mt.verify_signature(payload, "not-hex", signing_secret) is False
19-
assert mt.verify_signature(payload, "", signing_secret) is False
15+
if not mt.verify_signature(payload, signature, signing_secret):
16+
raise SystemExit("Signature verification failed!")

0 commit comments

Comments
 (0)