Merge pull request #29 from TheDevilOnLine/patch-1

Don't sleep when validation succesfull
This commit is contained in:
Peter Bakker
2020-09-21 09:12:15 +02:00
committed by GitHub

View File

@@ -297,7 +297,7 @@ class Client
$this->signPayloadKid(null, $challenge->getAuthorizationURL()) $this->signPayloadKid(null, $challenge->getAuthorizationURL())
); );
$data = json_decode((string)$response->getBody(), true); $data = json_decode((string)$response->getBody(), true);
if ($maxAttempts > 1) { if ($maxAttempts > 1 && $data['status'] != 'valid') {
sleep(ceil(15 / $maxAttempts)); sleep(ceil(15 / $maxAttempts));
} }
$maxAttempts--; $maxAttempts--;