PHP Class Kelunik\Acme\Verifiers\Http01

Show file Open project: kelunik/acme

Public Methods

Method Description
__construct ( Amp\Artax\HttpClient $client = null ) Http01 constructor.
verifyChallenge ( string $domain, string $token, string $payload ) : Amp\Promise Verifies a HTTP-01 challenge.

Private Methods

Method Description
doVerifyChallenge ( string $domain, string $token, string $payload ) : Generator Verifies a HTTP-01 challenge.

Method Details

__construct() public method

Http01 constructor.
public __construct ( Amp\Artax\HttpClient $client = null )
$client Amp\Artax\HttpClient HTTP client to use, otherwise a default client will be used

verifyChallenge() public method

Can be used to verify a challenge before requesting validation from a CA to catch errors early.
public verifyChallenge ( string $domain, string $token, string $payload ) : Amp\Promise
$domain string domain to verify
$token string challenge token
$payload string expected payload
return Amp\Promise resolves to null