当前位置: 首页>>代码示例>>C#>>正文


C# IAppBuilder.UseWsFederationPlugin方法代码示例

本文整理汇总了C#中IAppBuilder.UseWsFederationPlugin方法的典型用法代码示例。如果您正苦于以下问题:C# IAppBuilder.UseWsFederationPlugin方法的具体用法?C# IAppBuilder.UseWsFederationPlugin怎么用?C# IAppBuilder.UseWsFederationPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAppBuilder的用法示例。


在下文中一共展示了IAppBuilder.UseWsFederationPlugin方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ConfigurePlugins

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

            app.UseWsFederationPlugin(options);
        }
开发者ID:nyankov,项目名称:Thinktecture.IdentityServer.v3,代码行数:9,代码来源:Startup_LocalTest.cs

示例2: ConfigurePlugins

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

            app.UseWsFederationPlugin(options);
        }
开发者ID:Zoumaho,项目名称:Thinktecture.IdentityServer.v3,代码行数:9,代码来源:Startup_LocalTest.cs

示例3: ConfigurePlugins

        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);
        }
开发者ID:MauricioArroyo,项目名称:IdentityServer3.Samples,代码行数:10,代码来源:Startup.cs

示例4: ConfigurePlugins

        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);
        }
开发者ID:eugv86,项目名称:Thinktecture.IdentityServer.v3.Samples,代码行数:14,代码来源:Startup.cs

示例5: ConfigureWsFederation

        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);

        }
开发者ID:Arthyon,项目名称:IdentityServer3.WsFederationReproduction,代码行数:16,代码来源:IdentityStartup.cs

示例6: ConfigurePlugins

        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);
        }
开发者ID:nonintanon,项目名称:Thinktecture.IdentityServer.v3,代码行数:19,代码来源:Startup_LocalTest.cs

示例7: PluginConfiguration

        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
            });
        }
开发者ID:scottbrady91,项目名称:Blog-Example-Classes,代码行数:51,代码来源:Startup.cs


注:本文中的IAppBuilder.UseWsFederationPlugin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。