|
|
@@ -59,6 +59,7 @@ func (h *Handler) Route(r api.Router) {
|
|
|
|
|
|
r.MethodFunc("POST", getLink(acme.NewAccountLink, "{provisionerID}", false, nil), extractPayloadByJWK(h.NewAccount))
|
|
|
r.MethodFunc("POST", getLink(acme.AccountLink, "{provisionerID}", false, nil, "{accID}"), extractPayloadByKid(h.GetUpdateAccount))
|
|
|
+ r.MethodFunc("POST", getLink(acme.KeyChangeLink, "{provisionerID}", false, nil, "{accID}"), extractPayloadByKid(h.NotImplemented))
|
|
|
r.MethodFunc("POST", getLink(acme.NewOrderLink, "{provisionerID}", false, nil), extractPayloadByKid(h.NewOrder))
|
|
|
r.MethodFunc("POST", getLink(acme.OrderLink, "{provisionerID}", false, nil, "{ordID}"), extractPayloadByKid(h.isPostAsGet(h.GetOrder)))
|
|
|
r.MethodFunc("POST", getLink(acme.OrdersByAccountLink, "{provisionerID}", false, nil, "{accID}"), extractPayloadByKid(h.isPostAsGet(h.GetOrdersByAccount)))
|
|
|
@@ -66,6 +67,7 @@ func (h *Handler) Route(r api.Router) {
|
|
|
r.MethodFunc("POST", getLink(acme.AuthzLink, "{provisionerID}", false, nil, "{authzID}"), extractPayloadByKid(h.isPostAsGet(h.GetAuthz)))
|
|
|
r.MethodFunc("POST", getLink(acme.ChallengeLink, "{provisionerID}", false, nil, "{chID}"), extractPayloadByKid(h.GetChallenge))
|
|
|
r.MethodFunc("POST", getLink(acme.CertificateLink, "{provisionerID}", false, nil, "{certID}"), extractPayloadByKid(h.isPostAsGet(h.GetCertificate)))
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// GetNonce just sets the right header since a Nonce is added to each response
|
|
|
@@ -89,6 +91,11 @@ func (h *Handler) GetDirectory(w http.ResponseWriter, r *http.Request) {
|
|
|
api.JSON(w, dir)
|
|
|
}
|
|
|
|
|
|
+// NotImplemented returns a 501. This is a place holder for future functionality.
|
|
|
+func (h *Handler) NotImplemented(w http.ResponseWriter, r *http.Request) {
|
|
|
+ api.WriteError(w, acme.NotImplemented(nil).ToACME())
|
|
|
+}
|
|
|
+
|
|
|
// GetAuthz ACME api for retrieving an Authz.
|
|
|
func (h *Handler) GetAuthz(w http.ResponseWriter, r *http.Request) {
|
|
|
acc, err := acme.AccountFromContext(r.Context())
|