Skip to content

Commit b1ae1a4

Browse files
committed
Add detailed comments to skip_signature_verification param
1 parent ff3d7e5 commit b1ae1a4

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

linebot/v3/webhook.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ def __init__(self, channel_secret, skip_signature_verification = lambda: False):
116116
"""__init__ method.
117117
118118
:param str channel_secret: Channel secret (as text)
119+
:param skip_signature_verification: (optional) Function that determines
120+
whether to skip webhook signature verification.
121+
122+
If this function returns True, the signature verification step is skipped.
123+
This can be useful in scenarios such as when you're in the process of
124+
updating the channel secret and need to temporarily bypass verification
125+
to avoid disruptions.
119126
"""
120127
self.signature_validator = SignatureValidator(channel_secret)
121128
self.skip_signature_verification = skip_signature_verification
@@ -159,7 +166,13 @@ def __init__(self, channel_secret, skip_signature_verification = lambda: False):
159166
"""__init__ method.
160167
161168
:param str channel_secret: Channel secret (as text)
162-
:param skip_signature_verification: (optional) Function that returns a boolean value whether to skip signature validation
169+
:param skip_signature_verification: (optional) Function that determines
170+
whether to skip webhook signature verification.
171+
172+
If this function returns True, the signature verification step is skipped.
173+
This can be useful in scenarios such as when you're in the process of
174+
updating the channel secret and need to temporarily bypass verification
175+
to avoid disruptions.
163176
"""
164177
self.parser = WebhookParser(channel_secret, skip_signature_verification)
165178
self._handlers = {}

0 commit comments

Comments
 (0)