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

Method WWWAuthenticateChallenge

internal/agent/api.go:864–867  ·  view source on GitHub ↗

WWWAuthenticateChallenge is the v1-surface seam (internal/httpapi) for the RFC 6750 challenge. The legacy mux had the auth error in hand at the 401 site (writeAuthError); the v1 layer rejects via the canonical envelope and reaches this from a response wrapper that only knows the status was 401, so w

(r *http.Request)

Source from the content-addressed store, hash-verified

862// resolution is cheap, and routing it through the one auth path keeps the
863// surfaces from diverging.
864func (a *API) WWWAuthenticateChallenge(r *http.Request) string {
865 _, err := a.authenticatePrincipal(r)
866 return a.authChallenge(r, err)
867}
868
869// resolveAgentForUser loads an agent by email address and verifies the user owns it.
870func (a *API) resolveAgentForUser(r *http.Request, email string, user *identity.User) (*identity.AgentIdentity, error) {

Callers

nothing calls this directly

Calls 2

authenticatePrincipalMethod · 0.95
authChallengeMethod · 0.95

Tested by

no test coverage detected