Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory struct { Keys []json.RawMessage `json:"keys"` Purpose *string `json:"purpose,omitempty"` }
type Middleware ¶
type Middleware struct { DirectoryBase string `json:"directory_base"` // contains filtered or unexported fields }
Middleware struct to hold the configuration for the handler
func (Middleware) CaddyModule ¶
func (m Middleware) CaddyModule() caddy.ModuleInfo
CaddyModule function to provide module information to Caddy
func (*Middleware) Provision ¶
func (m *Middleware) Provision(ctx caddy.Context) error
Provision method for setting up the validator with the public key
func (*Middleware) ServeHTTP ¶
func (m *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
ServeHTTP method to handle the request and validate the signature
func (*Middleware) UnmarshalCaddyfile ¶
func (m *Middleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile method to allow configuration via the Caddyfile
type SignatureValidator ¶
type SignatureValidator struct {
Verifier *httpsig.Verifier
}
func NewValidator ¶
func NewValidator(keyData []byte) (*SignatureValidator, error)
Click to show internal directories.
Click to hide internal directories.