ServeWithEmail handles the WebSocket upgrade for an explicitly-provided agent email, so non-mux routers (chi at /v1/agents/{address}/ws) can host the same transport.
(w http.ResponseWriter, r *http.Request, rawEmail string)
| 45 | // agent email, so non-mux routers (chi at /v1/agents/{address}/ws) can host |
| 46 | // the same transport. |
| 47 | func (h *Handler) ServeWithEmail(w http.ResponseWriter, r *http.Request, rawEmail string) { |
| 48 | h.serve(w, r, rawEmail) |
| 49 | } |
| 50 | |
| 51 | func (h *Handler) serve(w http.ResponseWriter, r *http.Request, rawEmail string) { |
| 52 | // Authenticate via the `Authorization: Bearer <api_key>` handshake header — |