MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / writeOAuthError

Function writeOAuthError

internal/agent/oauth_handlers.go:114–119  ·  view source on GitHub ↗
(w http.ResponseWriter, status int, code, desc string)

Source from the content-addressed store, hash-verified

112}
113
114func writeOAuthError(w http.ResponseWriter, status int, code, desc string) {
115 w.Header().Set("Content-Type", "application/json")
116 w.Header().Set("Cache-Control", "no-store")
117 w.WriteHeader(status)
118 _ = json.NewEncoder(w).Encode(OAuthError{Error: code, ErrorDescription: desc})
119}
120
121// dcrSourceIP returns the per-IP key for DCR rate-limiting. DCR is
122// the only anonymous persistent-write endpoint; we can't trust

Callers 4

handleAgentIdentityMethod · 0.85
handleJWTBearerGrantMethod · 0.85
handleOAuthRegisterMethod · 0.85
handleOAuthGetClientMethod · 0.85

Calls 1

WriteHeaderMethod · 0.45

Tested by

no test coverage detected