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

Method AuthenticateUserForTest

internal/agent/export_test.go:24–30  ·  view source on GitHub ↗

AuthenticateUserForTest exposes API.authenticateUser so external test helpers can construct synthetic guard-protected handlers without re-implementing the bearer-token plumbing.

(r *http.Request)

Source from the content-addressed store, hash-verified

22// test helpers can construct synthetic guard-protected handlers
23// without re-implementing the bearer-token plumbing.
24func (a *API) AuthenticateUserForTest(r *http.Request) (userID string, err error) {
25 u, err := a.authenticateUser(r)
26 if err != nil {
27 return "", err
28 }
29 return u.ID, nil
30}
31
32// IdempotencyGuardForTest exposes API.idempotencyGuard so tests in the
33// external agent_test package can verify the side-effect-committed

Calls 1

authenticateUserMethod · 0.95

Tested by

no test coverage detected