http01

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package http01 provides logic regarding ACME-HTTP-01 protocol

Index

Constants

View Source
const (
	// WellKnownPath is the directory handled to resolve this challenge
	WellKnownPath = "/.well-known/acme-challenge"
)

Variables

This section is empty.

Functions

func NewChallengeMiddleware

func NewChallengeMiddleware(resolver acme.HTTP01Resolver) func(http.Handler) http.Handler

NewChallengeMiddleware creates middleware using a provided HTTP-01 challenge resolver

func TokenFromPath

func TokenFromPath(path string) (string, bool)

TokenFromPath returns the path within the well-known directory and an indicator if the path pointed to the well-known directory or not

Types

type ChallengeHandler

type ChallengeHandler struct {
	Resolver acme.HTTP01Resolver
	// contains filtered or unexported fields
}

ChallengeHandler handles /.well-known/acme-challenge requests against a given HTTP-01 Challenge Resolver

func NewChallengeHandler

func NewChallengeHandler(resolver acme.HTTP01Resolver) *ChallengeHandler

NewChallengeHandler creates a handler for the provided HTTP-01 challenge resolver

func (*ChallengeHandler) ServeHTTP

func (h *ChallengeHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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