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

Method HandleMe

internal/auth/auth.go:454–462  ·  view source on GitHub ↗

HandleMe returns the current authenticated user's info.

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

Source from the content-addressed store, hash-verified

452
453// HandleMe returns the current authenticated user's info.
454func (ua *UserAuth) HandleMe(w http.ResponseWriter, r *http.Request) {
455 user := ua.AuthenticateRequest(r)
456 if user == nil {
457 http.Error(w, "not authenticated", http.StatusUnauthorized)
458 return
459 }
460 w.Header().Set("Content-Type", "application/json")
461 writeJSON(w, user)
462}
463
464// HandleUpdateMe accepts a PATCH that updates the authenticated user's
465// display name. Other identity fields (email, google_subject) come from

Callers

nothing calls this directly

Calls 3

AuthenticateRequestMethod · 0.95
writeJSONFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected