make endpoints pointers to enable/disable them

This commit is contained in:
Tim Möhlmann 2023-09-27 18:09:00 +03:00
parent f6cb47fbbb
commit af22c1a4d8
12 changed files with 229 additions and 93 deletions

View file

@ -79,7 +79,7 @@ func SetupServer(issuer string, storage Storage, logger *slog.Logger, wrapServer
handler := http.Handler(provider)
if wrapServer {
handler = op.NewLegacyServer(provider)
handler = op.NewLegacyServer(provider, *op.DefaultEndpoints)
}
// we register the http handler of the OP on the root, so that the discovery endpoint (/.well-known/openid-configuration)