MCPcopy Create free account
hub / github.com/supabase/auth / ServeAuthenticatedRequest

Function ServeAuthenticatedRequest

internal/api/mfa_test.go:805–813  ·  view source on GitHub ↗
(ts *MFATestSuite, method, path, token string, buffer bytes.Buffer)

Source from the content-addressed store, hash-verified

803}
804
805func ServeAuthenticatedRequest(ts *MFATestSuite, method, path, token string, buffer bytes.Buffer) *httptest.ResponseRecorder {
806 w := httptest.NewRecorder()
807 req := httptest.NewRequest(method, path, &buffer)
808 req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token))
809 req.Header.Set("Content-Type", "application/json")
810
811 ts.API.handler.ServeHTTP(w, req)
812 return w
813}
814
815func performVerifyFlow(ts *MFATestSuite, challengeID, factorID uuid.UUID, token string, requireStatusOK bool) *httptest.ResponseRecorder {
816 var buffer bytes.Buffer

Calls 2

SetMethod · 0.80
ServeHTTPMethod · 0.45

Tested by

no test coverage detected