Open raggi opened 2 years ago
I'm happy to add additional test coverage, or provide examples of usage as you might like, but I wanted to send an in-principle patch first for feedback.
@raggi Would you be so kind to provide a usage example? Seems that doing
endpoints := mockoidc.EndpointConfig{
IssuerBase: "/",
TokenEndpoint: "/oauth/token",
}
endpoints.Defaults()
m.EndpointConfig = endpoints
doesn't really work, as well as not really convenient, as you can't inline it. Thank you
By customizing EndpointConfig, the mock server can now impersonate many other OIDC servers, which can then be used with a MITM-ing http.RoundTripper to execute tests against otherwise unaltered client code.