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

Method forwardError

oauth2/handler.go:1379–1383  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request, err error)

Source from the content-addressed store, hash-verified

1377func (h *Handler) handleOptions(http.ResponseWriter, *http.Request) {}
1378
1379func (h *Handler) forwardError(w http.ResponseWriter, r *http.Request, err error) {
1380 rfcErr := fosite.ErrorToRFC6749Error(err).WithExposeDebug(h.c.GetSendDebugMessagesToClients(r.Context()))
1381 query := rfcErr.ToValues()
1382 http.Redirect(w, r, urlx.CopyWithQuery(h.c.ErrorURL(r.Context()), query).String(), http.StatusFound)
1383}
1384
1385func (h *Handler) writeAuthorizeError(w http.ResponseWriter, r *http.Request, ar fosite.AuthorizeRequester, err error) {
1386 if !ar.IsRedirectURIValid() {

Callers 2

writeAuthorizeErrorMethod · 0.95

Calls 6

ErrorToRFC6749ErrorFunction · 0.92
WithExposeDebugMethod · 0.80
ToValuesMethod · 0.80
ErrorURLMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected