feat(op): allow Legacy Server extension (#466)
This change splits the constructor and registration of the Legacy Server. This allows it to be extended by struct embedding.
This commit is contained in:
parent
164c5b28c7
commit
bab5399859
4 changed files with 79 additions and 39 deletions
|
@ -80,7 +80,7 @@ func SetupServer(issuer string, storage Storage, logger *slog.Logger, wrapServer
|
|||
|
||||
handler := http.Handler(provider)
|
||||
if wrapServer {
|
||||
handler = op.NewLegacyServer(provider, *op.DefaultEndpoints)
|
||||
handler = op.RegisterLegacyServer(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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue