feat(op): allow Legacy Server extension

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:
Tim Möhlmann 2023-10-19 19:31:16 +03:00
parent 434b2e62d8
commit 506b5ce57e
4 changed files with 79 additions and 39 deletions

View file

@ -32,7 +32,7 @@ func jwtProfile() (string, error) {
}
func TestServerRoutes(t *testing.T) {
server := op.NewLegacyServer(testProvider, *op.DefaultEndpoints)
server := op.RegisterLegacyServer(op.NewLegacyServer(testProvider, *op.DefaultEndpoints))
storage := testProvider.Storage().(routesTestStorage)
ctx := op.ContextWithIssuer(context.Background(), testIssuer)