Skip to content

HTTP-01 Handler

lacme.challenges.http01

HTTP-01 challenge handler (RFC 8555 §8.3).

Maintains an in-memory token → key authorization mapping and optionally runs a minimal standalone HTTP server on port 80.

HTTP01Handler

HTTP-01 challenge handler.

Satisfies :class:~lacme.challenges.ChallengeHandler.

get_response
get_response(token: str) -> str | None

Return the key authorization for token, or None.

start_server async
start_server(host: str = '0.0.0.0', port: int = 80) -> asyncio.Server

Start a minimal HTTP server serving ACME challenge responses.

Returns the :class:asyncio.Server so the caller can close it. Use port=0 in tests to let the OS pick an available port.