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

Method authenticateUser

internal/agent/api.go:689–695  ·  view source on GitHub ↗

authenticateUser is the user-only convenience over authenticatePrincipal, retained for the legacy mux handlers (OAuth / session auth) that do not enforce the v1 scope ceiling.

(r *http.Request)

Source from the content-addressed store, hash-verified

687// authenticateUser is the user-only convenience over authenticatePrincipal,
688// retained for the legacy mux handlers (OAuth / session auth) that do not enforce the v1 scope ceiling.
689func (a *API) authenticateUser(r *http.Request) (*identity.User, error) {
690 p, err := a.authenticatePrincipal(r)
691 if err != nil {
692 return nil, err
693 }
694 return p.User, nil
695}
696
697func (a *API) authenticatePrincipal(r *http.Request) (*identity.Principal, error) {
698 authHeader := r.Header.Get("Authorization")

Callers 1

Calls 1

authenticatePrincipalMethod · 0.95

Tested by 1