basic

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAuthenticationHeaderFound        = errors.New("no authentication header found in request")
	ErrMultipleAuthenticationHeadersFound = errors.New("multiple authentication headers found in request")
	ErrInvalidAuthenticationType          = errors.New("invalid authentication type in request")
	ErrUnauthorized                       = errors.New("unauthorized request")
)

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	Username string              `json:"username"`
	Secret   config.SecretSource `json:"secret"`
}

func (Authentication) CheckSignature

func (a Authentication) CheckSignature(req webhook.ValidatingRequest) error

CheckSignature will read the webhook authentication header and will check if the provided username and secret match the ones in the request.

func (Authentication) Validate

func (a Authentication) Validate() error

Validate checks if the Basic configuration is valid. It requires that if username is set also secret must be set.

Jump to

Keyboard shortcuts

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