Documentation
¶
Overview ¶
Package validation provides functionality for validating webhook signatures to verify request authenticity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebhookSecret ¶
type WebhookSecret string
WebhookSecret represents a secret used to validate webhook signatures for verifying request authenticity.
func NewWebhookSecret ¶
func NewWebhookSecret(secret string) *WebhookSecret
NewWebhookSecret creates a new WebhookSecret instance from the provided secret string pointer and returns its address.
func (*WebhookSecret) ValidateSignature ¶
func (s *WebhookSecret) ValidateSignature(body []byte, headers map[string]string) error
ValidateSignature validates the HMAC-SHA256 signature of a webhook request using the provided body and headers.
Click to show internal directories.
Click to hide internal directories.