private void ConfigurePlugins(IAppBuilder app, PluginConfiguration dependencies)
        {
            var options = new WsFederationPluginOptions(dependencies)
            {
                RelyingPartyService = () => new InMemoryRelyingPartyService(LocalTestRelyingParties.Get()),
            };

            app.UseWsFederationPlugin(options);
        }
        private void ConfigurePlugins(IAppBuilder app, PluginDependencies dependencies)
        {
            var options = new WsFederationPluginOptions(dependencies)
            {
                RelyingPartyService = () => new TestRelyingPartyService(),
            };

            app.UseWsFederationPlugin(options);
        }
        private void ConfigurePlugins(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var wsFedOptions = new WsFederationPluginOptions(options);

            // data sources for in-memory services
            wsFedOptions.Factory.Register(new Registration<IEnumerable<RelyingParty>>(RelyingParties.Get()));
            wsFedOptions.Factory.RelyingPartyService = new Registration<IRelyingPartyService>(typeof(InMemoryRelyingPartyService));

            pluginApp.UseWsFederationPlugin(wsFedOptions);
        }
Example #4
0
        private static void ConfigurePlugins(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var wsFedOptions = new WsFederationPluginOptions(options);

            // data sources for in-memory services
            wsFedOptions.Factory.Register(new Registration <IEnumerable <RelyingParty> > (RelyingParties.Get()));
            wsFedOptions.Factory.RelyingPartyService = new Registration <IRelyingPartyService> (typeof(InMemoryRelyingPartyService));

            pluginApp.UseWsFederationPlugin(wsFedOptions);
        }
Example #5
0
        private static void PluginConfiguration(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var relyingParties = new List <RelyingParty>
            {
                new RelyingParty
                {
                    Realm     = "urn:encryptedrealmV1",
                    ReplyUrl  = "https://localhost:44344/",
                    TokenType = TokenTypes.Saml11TokenProfile11,
                    DefaultClaimTypeMappingPrefix = "http://local.schema.org/",
                    IncludeAllClaimsForUser       = true,
                    ClaimMappings =
                        new Dictionary <string, string> {
                        { "sub", ClaimTypes.NameIdentifier },
                        { "name", ClaimTypes.Name },
                        { "given_name", ClaimTypes.GivenName },
                        { "family_name", ClaimTypes.Surname },
                        { "email", ClaimTypes.Email }
                    },
                    EncryptingCertificate = Cert.LoadEncrypting()
                },
                new RelyingParty
                {
                    Realm     = "urn:encryptedrealmV2",
                    ReplyUrl  = "https://localhost:44344/",
                    TokenType = TokenTypes.Saml2TokenProfile11,
                    DefaultClaimTypeMappingPrefix = "http://local.schema.org/",
                    IncludeAllClaimsForUser       = true,
                    ClaimMappings =
                        new Dictionary <string, string> {
                        { "sub", ClaimTypes.NameIdentifier },
                        { "name", ClaimTypes.Name },
                        { "given_name", ClaimTypes.GivenName },
                        { "family_name", ClaimTypes.Surname },
                        { "email", ClaimTypes.Email }
                    },
                    EncryptingCertificate = Cert.LoadEncrypting()
                }
            };

            var factory = new WsFederationServiceFactory(options.Factory);

            factory.Register(new Registration <IEnumerable <RelyingParty> >(relyingParties));
            factory.RelyingPartyService = new Registration <IRelyingPartyService>(typeof(InMemoryRelyingPartyService));

            pluginApp.UseWsFederationPlugin(new WsFederationPluginOptions
            {
                IdentityServerOptions = options,
                Factory = factory,
                EnableMetadataEndpoint = true
            });
        }
        private void ConfigurePlugins(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var wsFedOptions = new WsFederationPluginOptions
            {
                IdentityServerOptions = options,
                Factory = new WsFederationServiceFactory
                {
                    UserService = options.Factory.UserService,
                    RelyingPartyService = Registration.RegisterFactory<IRelyingPartyService>(() => new InMemoryRelyingPartyService(RelyingParties.Get())),
                }
            };

            pluginApp.UseWsFederationPlugin(wsFedOptions);
        }
        private void ConfigurePlugins(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var wsFedOptions = new WsFederationPluginOptions
            {
                IdentityServerOptions = options,
                Factory = new WsFederationServiceFactory
                {
                    UserService         = options.Factory.UserService,
                    RelyingPartyService = Registration.RegisterFactory <IRelyingPartyService>(() => new InMemoryRelyingPartyService(RelyingParties.Get())),
                }
            };

            pluginApp.UseWsFederationPlugin(wsFedOptions);
        }
        private void ConfigureWsFederation(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var factory = new WsFederationServiceFactory(options.Factory);

            factory.RelyingPartyService = new Registration<IRelyingPartyService>(typeof(RelyingPartiesService));

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

            pluginApp.UseWsFederationPlugin(wsFedOptions);

        }
Example #9
0
        private void ConfigureWsFederation(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var factory = new WsFederationServiceFactory(options.Factory)
            {
                RelyingPartyService = new Registration <IRelyingPartyService>(typeof(InMemoryRelyingPartyService))
            };

            factory.UseInMemoryRelyingParties(GetWsFedRelyingParties());

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

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

            // data sources for in-memory services
            factory.Register(Registration.RegisterSingleton <IEnumerable <RelyingParty> >(RelyingParties.Get()));

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

            pluginApp.UseWsFederationPlugin(wsFedOptions);
        }
        private void ConfigurePlugins(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var wsFedOptions = new WsFederationPluginOptions
            {
                // todo - also signoutcleanup is broken right now
                LoginPageUrl = "http://localhost:3333/core/login",
                LogoutPageUrl = "http://localhost:3333/core/connect/logout",

                Factory = new WsFederationServiceFactory
                {
                    UserService = options.Factory.UserService,
                    CoreSettings = options.Factory.CoreSettings,
                    RelyingPartyService = Registration.RegisterFactory<IRelyingPartyService>(() => new InMemoryRelyingPartyService(RelyingParties.Get())),
                    WsFederationSettings = Registration.RegisterFactory<WsFederationSettings>(() => new WsFedSettings())
                },
            };

            pluginApp.UseWsFederationPlugin(wsFedOptions);
        }
        private void ConfigurePlugins(IAppBuilder pluginApp, IdentityServerOptions coreOptions)
        {
            var wsfedOptions = new WsFederationPluginOptions
            {
                // todo - also signoutcleanup is broken right now
                LoginPageUrl  = "http://localhost:3333/core/login",
                LogoutPageUrl = "http://localhost:3333/core/connect/logout",

                Factory = new WsFederationServiceFactory
                {
                    UserService          = coreOptions.Factory.UserService,
                    CoreSettings         = coreOptions.Factory.CoreSettings,
                    RelyingPartyService  = Registration.RegisterFactory <IRelyingPartyService>(() => new InMemoryRelyingPartyService(LocalTestRelyingParties.Get())),
                    WsFederationSettings = Registration.RegisterFactory <WsFederationSettings>(() => new LocalTestWsFederationSettings())
                },
            };

            pluginApp.UseWsFederationPlugin(wsfedOptions);
        }
        private static void ConfigurePlugins(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var efConfig = new EntityFrameworkServiceOptions
            {
                ConnectionString = "IdSvr3Config"
            };

            // pre-populate the test DB from the in-memory config
            ConfigureRelyingParties(RelyingParties.Get(), efConfig);

            var factory = new WsFederationServiceFactory(options.Factory);

            factory.RegisterRelyingPartyService(efConfig);

            var wsFedOptions = new WsFederationPluginOptions(options)
            {
                Factory = factory
            };

            pluginApp.UseWsFederationPlugin(wsFedOptions);
        }
        private static void PluginConfiguration(IAppBuilder pluginApp, IdentityServerOptions options)
        {
            var relyingParties = new List<RelyingParty>
            {
                new RelyingParty
                {
                    Realm = "urn:encryptedrealmV1",
                    ReplyUrl = "https://localhost:44344/",
                    TokenType = TokenTypes.Saml11TokenProfile11,
                    DefaultClaimTypeMappingPrefix = "http://local.schema.org/",
                    IncludeAllClaimsForUser = true,
                    ClaimMappings =
                    new Dictionary<string, string> {
                        { "sub", ClaimTypes.NameIdentifier },
                        { "name", ClaimTypes.Name },
                        { "given_name", ClaimTypes.GivenName },
                        { "family_name", ClaimTypes.Surname },
                        { "email", ClaimTypes.Email }
                    },
                    EncryptingCertificate = Cert.LoadEncrypting()
                },
                new RelyingParty
                {
                    Realm = "urn:encryptedrealmV2",
                    ReplyUrl = "https://localhost:44344/",
                    TokenType = TokenTypes.Saml2TokenProfile11,
                    DefaultClaimTypeMappingPrefix = "http://local.schema.org/",
                    IncludeAllClaimsForUser = true,
                    ClaimMappings =
                    new Dictionary<string, string> {
                        { "sub", ClaimTypes.NameIdentifier },
                        { "name", ClaimTypes.Name },
                        { "given_name", ClaimTypes.GivenName },
                        { "family_name", ClaimTypes.Surname },
                        { "email", ClaimTypes.Email }
                    },
                    EncryptingCertificate = Cert.LoadEncrypting()
                }
            };

            var factory = new WsFederationServiceFactory(options.Factory);
            factory.Register(new Registration<IEnumerable<RelyingParty>>(relyingParties));
            factory.RelyingPartyService = new Registration<IRelyingPartyService>(typeof (InMemoryRelyingPartyService));

            pluginApp.UseWsFederationPlugin(new WsFederationPluginOptions
            {
                IdentityServerOptions = options,
                Factory = factory,
                EnableMetadataEndpoint = true
            });
        }