authenticateUser extracts and validates the bearer credential from the request, returning the owning user. Dispatch is by token prefix: - ate2a_ → OAuth access token (fosite-validated via the configured provider). Rejected if missing, revoked, expired, or the provider isn't wired. - anything else
(r *http.Request)
| 669 | // resolution path (API key, OAuth bearer, session cookie) instead of |
| 670 | // forking a second one. There is one place credentials are checked. |
| 671 | func (a *API) AuthenticateUser(r *http.Request) (*identity.User, error) { |
| 672 | p, err := a.authenticatePrincipal(r) |
| 673 | if err != nil { |
| 674 | return nil, err |
| 675 | } |
| 676 | return p.User, nil |
| 677 | } |
| 678 | |
| 679 | // AuthenticatePrincipal is the scope-aware seam (Slice 5a): same credential |
| 680 | // resolution as AuthenticateUser, but returns the full principal (user + scope |
nothing calls this directly
no test coverage detected