webhook

package
v0.0.0-...-de239a3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const SignatureHeader = "X-WC-Webhook-Signature"

SignatureHeader is the name of the HTTP header in which the webhook signature of the payload is given.

Variables

This section is empty.

Functions

func CheckPayload

func CheckPayload(data []byte, signature, secret string) (bool, error)

CheckPayload checks if the signature of the data is correct, using the webhook secret key.

func CheckRequest

func CheckRequest(body []byte, r *http.Request, secret string) (bool, error)

CheckRequest is a helper function that checks weather the signature in the request header for the body data is correct.

Types

This section is empty.

Jump to

Keyboard shortcuts

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