JSON responses for challenges #2382
-
I’m using the lego library for an internal API and want to return a JSON response when performing DNS-01/HTTP-01 validation. The client sends a challenge, and I expect a JSON response containing the generated value, status, and other relevant details. I’m having trouble implementing this approach. Is it possible with the lego library? |
Beta Was this translation helpful? Give feedback.
Answered by
ldez
Dec 18, 2024
Replies: 1 comment 7 replies
-
Your question is too vague to be answered. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are mixing things that a completely different: each challenge has its constraints.
For the DNS challenge, you don't need to store anything because it only relies on DNS.
For the HTTP challenge, you can do the same thing as the
HTTPProvider
implementation https://github.com/go-acme/lego/blob/master/providers/http/webroot/webroot.golego is integrated into several software like Traefik, 1Panel, etc. that are already doing what you are trying to do and they don't need to store anything else than the account information, private key, and certificates.
This question doesn't make any sense to me as it d…