afosto / yaac

Yet another ACME client: a decoupled LetsEncrypt client
Other
219 stars 85 forks source link

How to retrieve order and authorizations at a later time? #65

Open s--g opened 5 months ago

s--g commented 5 months ago

Hello. I feel like this will be an obvious answer, so apologies in advance. It is intended that our application will create an order and then we need time to manually add the validation TXT records to DNS. How do we later retrieve the authorizations to pass to $client->validate().

For example, it may be that on day 1 we execute: $client = new Client([...]); $order = $client->createOrder([...]); $authorizations = $client->authorize($order);

Then we need time to modify DNS and for the changes to propagate.

Then on say day 2 we execute: $client->selfTest($authorization); $client->validate($authorization); ... $certificate = $client->getCertificate($order);

But how do we retrieve the authorizations on day 2 when they were generated on the previous day? I see that the Client class has a getOrder() method. Is that at least the correct way to retrieve the order on day 2? I see the Order class has a getAuthorizationURLs() method which internally returns $this->authorizations, but the code docs state that it returns an array of strings. I believe I need an array of Authorization objects in order to generate the certificates?