IdentityServer / IdentityServer3.WsFederation

WS-Federation Plugin for IdentityServer v3
Apache License 2.0
25 stars 36 forks source link

404 for the Metadata Endpoint in RC #15

Closed equist closed 9 years ago

equist commented 9 years ago

When I upgraded from Beta 4 to RC I got 404 on /wsfed/metadata. I thought that it might have moved, but I couldn't find where and the samples does not seem to point on any other location.

I am using IdSrv in the same process with this configuration:

        app.Map("/sts", stsApp =>
                        {
                            var factory = InMemoryFactory.Create(null, Clients.Get(), Scopes.Get());
                            factory.UserService = new Registration<IUserService>(new MyInMemoryUserService(Users.Get()));

                            var options = new IdentityServerOptions
                                          {
                                              IssuerUri = "XXX",
                                              SiteName = "XXX",
                                              RequireSsl = false, //Test

                                              SigningCertificate = Certificate.Get(),
                                              Factory = factory,

                                              AuthenticationOptions = new AuthenticationOptions
                                              {
                                                  IdentityProviders = ConfigureAdditionalIdentityProviders
                                              },
                                              PluginConfiguration = ConfigurePlugins
                                          };

                            stsApp.UseIdentityServer(options);
                        });

    private void ConfigurePlugins(IAppBuilder app, IdentityServerOptions options)
    {
        var factory = new WsFederationServiceFactory
        {
            UserService = options.Factory.UserService,
            RelyingPartyService = new Registration<IRelyingPartyService>(typeof(InMemoryRelyingPartyService))
        };

        factory.Register(new Registration<IEnumerable<RelyingParty>>(RelyingParties.Get()));

        var wsFedOptions = new WsFederationPluginOptions
        {
            IdentityServerOptions = options,
            EnableMetadataEndpoint = true,
            Factory = factory
        };

        app.UseWsFederationPlugin(wsFedOptions);

    }

As you can see I have also tried to set EnableMetadataEndpoint explicitly.

equist commented 9 years ago

I had misstakenly changed build configuration without noticing and that caused the issue for me. Sorry.