swagger:route DELETE /oauth2/register/{id} oidc deleteOidcDynamicClient # Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly
(w http.ResponseWriter, r *http.Request)
| 817 | // Extensions: |
| 818 | // x-ory-ratelimit-bucket: hydra-public-high |
| 819 | func (h *Handler) deleteOidcDynamicClient(w http.ResponseWriter, r *http.Request) { |
| 820 | if err := h.requireDynamicAuth(r); err != nil { |
| 821 | h.r.Writer().WriteError(w, r, err) |
| 822 | return |
| 823 | } |
| 824 | client, err := h.ValidDynamicAuth(r, r.PathValue("id")) |
| 825 | if err != nil { |
| 826 | h.r.Writer().WriteError(w, r, err) |
| 827 | return |
| 828 | } |
| 829 | |
| 830 | if err := h.r.ClientManager().DeleteClient(r.Context(), client.GetID()); err != nil { |
| 831 | h.r.Writer().WriteError(w, r, err) |
| 832 | return |
| 833 | } |
| 834 | |
| 835 | w.WriteHeader(http.StatusNoContent) |
| 836 | } |
| 837 | |
| 838 | func (h *Handler) ValidDynamicAuth(r *http.Request, id string) (fosite.Client, error) { |
| 839 | c, err := h.r.ClientManager().GetConcreteClient(r.Context(), id) |
nothing calls this directly
no test coverage detected