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

Function extractFormToken

internal/agent/hitl_magic_api.go:127–130  ·  view source on GitHub ↗

extractFormToken pulls the token from standard form encoding. Request body is expected to be application/x-www-form-urlencoded since the confirmation page submits a plain HTML form.

(r *http.Request)

Source from the content-addressed store, hash-verified

125// body is expected to be application/x-www-form-urlencoded since the
126// confirmation page submits a plain HTML form.
127func extractFormToken(r *http.Request) string {
128 _ = r.ParseForm()
129 return r.FormValue("t")
130}
131
132// verifyMagicToken runs the HMAC + exp + action whitelist checks and
133// returns either claims or an (HTTP status, user-visible message) pair.

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected