Skip to content

Commit 9ee29e8

Browse files
committed
3.8 types
1 parent 9e4e877 commit 9ee29e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flagsmith/webhooks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import hashlib
22
import hmac
3+
from typing import Union
34

45

56
def generate_signature(
6-
request_body: str | bytes,
7+
request_body: Union[str, bytes],
78
shared_secret: str,
89
) -> str:
910
"""Generates a signature for a webhook request body using HMAC-SHA256.
@@ -25,7 +26,7 @@ def generate_signature(
2526

2627

2728
def verify_signature(
28-
request_body: str | bytes,
29+
request_body: Union[str, bytes],
2930
received_signature: str,
3031
shared_secret: str,
3132
) -> bool:

0 commit comments

Comments
 (0)