(handler http.HandlerFunc)
| 1517 | } |
| 1518 | |
| 1519 | func (f *FakeIDP) SetCoderdCallbackHandler(handler http.HandlerFunc) { |
| 1520 | f.SetCoderdCallback(func(req *http.Request) (*http.Response, error) { |
| 1521 | resp := httptest.NewRecorder() |
| 1522 | handler.ServeHTTP(resp, req) |
| 1523 | return resp.Result(), nil |
| 1524 | }) |
| 1525 | } |
| 1526 | |
| 1527 | // ExternalAuthConfigOptions exists to provide additional functionality ontop |
| 1528 | // of the standard "validate" url. Some providers like github we actually parse |