MCPcopy
hub / github.com/ory/hydra / getOidcDynamicClient

Method getOidcDynamicClient

client/handler.go:648–670  ·  view source on GitHub ↗

swagger:route GET /oauth2/register/{id} oidc getOidcDynamicClient # Get OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It imp

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

646// Extensions:
647// x-ory-ratelimit-bucket: hydra-admin-low
648func (h *Handler) getOidcDynamicClient(w http.ResponseWriter, r *http.Request) {
649 if err := h.requireDynamicAuth(r); err != nil {
650 h.r.Writer().WriteError(w, r, err)
651 return
652 }
653
654 client, err := h.ValidDynamicAuth(r, r.PathValue("id"))
655 if err != nil {
656 h.r.Writer().WriteError(w, r, err)
657 return
658 }
659
660 c, err := h.r.ClientManager().GetConcreteClient(r.Context(), client.GetID())
661 if err != nil {
662 err = herodot.ErrUnauthorized.WithReason("The requested OAuth 2.0 client does not exist or you did not provide the necessary credentials")
663 h.r.Writer().WriteError(w, r, err)
664 return
665 }
666
667 c.Secret = ""
668 c.Metadata = nil
669 h.r.Writer().Write(w, r, c)
670}
671
672// Delete OAuth2 Client Parameters
673//

Callers

nothing calls this directly

Calls 7

requireDynamicAuthMethod · 0.95
ValidDynamicAuthMethod · 0.95
WriterMethod · 0.65
GetConcreteClientMethod · 0.65
ClientManagerMethod · 0.65
GetIDMethod · 0.65
WriteMethod · 0.45

Tested by

no test coverage detected