【问题标题】:IdentityServer4 - Using External AuthenticationIdentityServer4 - 使用外部身份验证
【发布时间】:2019-04-12 05:12:09
【问题描述】:

我正在尝试使用 IdentityServer4,使用混合流程来实现授权服务器。 假设网址是:auth.company.com

为了验证用户身份,该公司使用简单的 .NET MVC 登录/密码表单。 网址:client.company.com/login.html

我的问题是:如何将身份验证系统插入 IdentityServer4?

我试过添加这个:

Startup.cs / ConfigureServices()

services.AddIdentityServer(SetupIdentityServer)
 private static void SetupIdentityServer(IdentityServerOptions options)
        {
            options.UserInteraction.LoginUrl = @"client.company.com/login.html";
            options.UserInteraction.LoginReturnUrlParameter = "referrer";

        }

但它导致认证服务器和认证服务器之间的重定向错误太多 谢谢

【问题讨论】:

    标签: c# authentication openid identityserver4 openid-connect


    【解决方案1】:

    我刚刚回答了另一个与此非常相似的问题,所以这是一个无耻的复制和粘贴:

    这将不起作用,因为身份服务器需要在进行身份验证后发布自己的 cookie。此 cookie 允许授权端点知道谁已登录。

    此模型的目的是在 IDP 上进行身份验证,或者通过合适的协议与外部提供商协商。因此,在这种情况下,适当的方法是将登录 UI 移动到您的身份服务器应用程序中。具体如何完成以及从何处获取数据完全取决于您,但发出 cookie 的必须是您的 identityserver4。

    【讨论】:

      猜你喜欢
      • 2018-07-19
      • 1970-01-01
      • 2020-07-10
      • 2018-01-02
      • 1970-01-01
      • 2017-02-16
      • 2021-05-01
      • 1970-01-01
      • 2010-12-25
      相关资源
      最近更新 更多