【问题标题】:OpenId authentication skip "Please wait..." screenOpenId 身份验证跳过“请稍候...”屏幕
【发布时间】:2017-01-19 13:49:22
【问题描述】:

在将用户重定向到最终页面之前,我有一个使用 OpenID 身份验证作为中间层的 .net 核心应用程序。

这是 Startup.cs 中的部分代码:

var factory = new IdentityServerServiceFactory();
            factory.UseInMemoryClients(Clients.Get())
                .UseInMemoryScopes(Scopes.Get())
                .UseInMemoryUsers(Users.Get())
                .CorsPolicyService = new Registration<ICorsPolicyService>(new InMemoryCorsPolicyService(Clients.Get()));
            var identityServerOptions = new IdentityServerOptions
            {
                SiteName = "Site name",
                SigningCertificate = Certificate.Get(),
                Factory = factory,
                AuthenticationOptions = new IdentityServer3.Core.Configuration.AuthenticationOptions
                {
                    IdentityProviders = ConfigureWsFed,
                    EnableSignOutPrompt = false,
                    EnablePostSignOutAutoRedirect = true,
                    PostSignOutAutoRedirectDelay = 0
                },
                LoggingOptions = new LoggingOptions()
                {
                    EnableHttpLogging = true,
                    EnableKatanaLogging = true,
                    EnableWebApiDiagnostics = true,
                    WebApiDiagnosticsIsVerbose = true
                }
            };

这里的问题是,在用户登录并提交密码后,它会将用户重定向到带有“请稍候...”消息的 openId 页面,然后重定向到最终产品页面。

我的问题是:有没有办法以编程方式移除对中间屏幕的重定向?

【问题讨论】:

    标签: c# authentication redirect owin openid


    【解决方案1】:

    原来你不能跳过屏幕,但你可以通过在主项目中添加模板文件夹来编辑模板,并添加包含内容的 _authorizeresponse.html 文件:

    <div class="page-header">
        <h1>Please wait...</h1>
    </div>
    
    <div class="row">
        <div class="col-md-6 col-sm-6">
            <form method="post" action="{responseUri}">
                {responseFields}
            </form>
        </div>
    </div>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-05-03
      • 2018-06-25
      • 1970-01-01
      • 2019-03-20
      • 2018-04-12
      • 2021-09-07
      • 2010-09-06
      相关资源
      最近更新 更多