validation

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL