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

Method createOAuth2Client

client/handler.go:94–102  ·  view source on GitHub ↗

swagger:route POST /admin/clients oAuth2 createOAuth2Client # Create OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. Consumes:

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

Source from the content-addressed store, hash-verified

92// Extensions:
93// x-ory-ratelimit-bucket: hydra-admin-high
94func (h *Handler) createOAuth2Client(w http.ResponseWriter, r *http.Request) {
95 c, err := h.CreateClient(r, h.r.ClientValidator().Validate, false)
96 if err != nil {
97 h.r.Writer().WriteError(w, r, err)
98 return
99 }
100
101 h.r.Writer().WriteCreated(w, r, urlx.MustJoin("/admin", ClientsHandlerPath, url.PathEscape(c.GetID())), &c)
102}
103
104// OpenID Connect Dynamic Client Registration Parameters
105//

Callers

nothing calls this directly

Calls 4

CreateClientMethod · 0.95
ClientValidatorMethod · 0.65
WriterMethod · 0.65
GetIDMethod · 0.65

Tested by

no test coverage detected