We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e4e877 commit 9ee29e8Copy full SHA for 9ee29e8
flagsmith/webhooks.py
@@ -1,9 +1,10 @@
1
import hashlib
2
import hmac
3
+from typing import Union
4
5
6
def generate_signature(
- request_body: str | bytes,
7
+ request_body: Union[str, bytes],
8
shared_secret: str,
9
) -> str:
10
"""Generates a signature for a webhook request body using HMAC-SHA256.
@@ -25,7 +26,7 @@ def generate_signature(
25
26
27
28
def verify_signature(
29
30
received_signature: str,
31
32
) -> bool:
0 commit comments