(ts *MFATestSuite, method, path, token string, buffer bytes.Buffer)
| 803 | } |
| 804 | |
| 805 | func 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 | |
| 815 | func performVerifyFlow(ts *MFATestSuite, challengeID, factorID uuid.UUID, token string, requireStatusOK bool) *httptest.ResponseRecorder { |
| 816 | var buffer bytes.Buffer |
no test coverage detected