Added selftest method to README.md

This commit is contained in:
peterbakker
2020-03-18 19:40:19 +01:00
parent b7ff268e4e
commit 451a21a505

View File

@@ -107,11 +107,14 @@ challenge.
```php
foreach ($authorizations as $authorization) {
$client->validate($authorization->getHttpChallenge(), 15);
if ($client->selfTest($authorization, Client::VALIDATION_HTTP)) {
$client->validate($authorization->getHttpChallenge(), 15);
}
}
```
The method above will perform 15 attempts to ask LetsEncrypt to validate the challenge (with 1 second intervals) and
The code above will first perform a self test and, if successful, will do 15 attempts to ask LetsEncrypt to validate the challenge (with 1 second intervals) and
retrieve an updated status (it might take Lets Encrypt a few seconds to validate the challenge).
### Get the certificate