Method | Description | |
---|---|---|
__construct ( string $directoryUri, |
AcmeClient constructor. | |
get ( string $resource ) : Amp\Promise | Retrieves a resource using a GET request. | |
post ( string $resource, array $payload ) : Amp\Promise | Retrieves a resource using a POST request. |
Method | Description | |
---|---|---|
buildClient ( ) : |
Constructs a default HTTP client. | |
doGet ( string $resource ) : Generator | Retrieves a resource using a GET request. | |
doPost ( string $resource, array $payload ) : Generator | Retrieves a resource using a POST request. | |
fetchDirectory ( ) : Generator | Retrieves the directory and stores it in the directory property. | |
getNonce ( string $uri ) : Amp\Promise | Pops a locally stored nonce or requests a new one for usage. | |
getResourceUri ( string $resource ) : Amp\Promise | Returns the URI to a resource by querying the directory. Can also handle URIs and returns them directly. | |
requestNonce ( string $uri ) : Amp\Promise | Requests a new request nonce from the server. | |
saveNonce ( Amp\Artax\Response $response ) | Saves the nonce if one was provided in the response. |
public __construct ( string $directoryUri, |
||
$directoryUri | string | URI to the ACME server directory |
$keyPair | account key pair | |
$http | Amp\Artax\HttpClient | custom HTTP client, default client will be used if no value is provided |