|
|
@ -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.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.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.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.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)))
|
|
|
|
r.MethodFunc("POST", getLink(acme.OrdersByAccountLink, "{provisionerID}", false, nil, "{accID}"), extractPayloadByKid(h.isPostAsGet(h.GetOrdersByAccount)))
|
|
|
@ -89,6 +90,12 @@ func (h *Handler) GetDirectory(w http.ResponseWriter, r *http.Request) {
|
|
|
|
api.JSON(w, dir)
|
|
|
|
api.JSON(w, dir)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NotImplemented returns a 501 and is generally a placeholder for functionality which
|
|
|
|
|
|
|
|
// MAY be added at some point in the future but is not in any way a guarantee of such.
|
|
|
|
|
|
|
|
func (h *Handler) NotImplemented(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
|
|
api.WriteError(w, acme.NotImplemented(nil).ToACME())
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetAuthz ACME api for retrieving an Authz.
|
|
|
|
// GetAuthz ACME api for retrieving an Authz.
|
|
|
|
func (h *Handler) GetAuthz(w http.ResponseWriter, r *http.Request) {
|
|
|
|
func (h *Handler) GetAuthz(w http.ResponseWriter, r *http.Request) {
|
|
|
|
acc, err := acme.AccountFromContext(r.Context())
|
|
|
|
acc, err := acme.AccountFromContext(r.Context())
|
|
|
|