feat(handlers): Add in-memory HTTP-01 challenge handler and rename file-based handler to Http01Webroot

This commit is contained in:
2025-04-30 14:55:03 +00:00
parent 9f66a0487f
commit fc420eb615
9 changed files with 204 additions and 14 deletions

View File

@ -6,14 +6,14 @@ import type { IChallengeHandler } from './IChallengeHandler.js';
* HTTP-01 ACME challenge handler using file-system webroot.
* Writes and removes the challenge file under <webroot>/.well-known/acme-challenge/.
*/
export interface Http01HandlerOptions {
export interface Http01WebrootOptions {
/**
* Directory that serves HTTP requests for /.well-known/acme-challenge
*/
webroot: string;
}
export class Http01Handler implements IChallengeHandler<{
export class Http01Webroot implements IChallengeHandler<{
type: string;
token: string;
keyAuthorization: string;
@ -21,7 +21,7 @@ export class Http01Handler implements IChallengeHandler<{
}> {
private webroot: string;
constructor(options: Http01HandlerOptions) {
constructor(options: Http01WebrootOptions) {
this.webroot = options.webroot;
}