24 lines
676 B
TypeScript
24 lines
676 B
TypeScript
/**
|
|
* Pluggable interface for ACME challenge handlers.
|
|
* Supports DNS-01, HTTP-01, TLS-ALPN-01, or custom challenge types.
|
|
*/
|
|
export interface IChallengeHandler<T> {
|
|
/**
|
|
* ACME challenge types this handler supports (e.g. ['dns-01']).
|
|
*/
|
|
getSupportedTypes(): string[];
|
|
/**
|
|
* Prepare the challenge: set DNS record, start HTTP/TLS server, etc.
|
|
*/
|
|
prepare(ch: T): Promise<void>;
|
|
/**
|
|
* Optional extra verify step (HTTP GET, ALPN handshake).
|
|
*/
|
|
verify?(ch: T): Promise<void>;
|
|
/**
|
|
* Clean up resources: remove DNS record, stop server.
|
|
*/
|
|
cleanup(ch: T): Promise<void>;
|
|
|
|
checkWetherDomainIsSupported(domainArg: string): Promise<boolean>;
|
|
} |