【问题标题】:ASP.NET Core Windows Authentication on Linux [closed]Linux 上的 ASP.NET Core Windows 身份验证 [关闭]
【发布时间】:2019-07-25 08:30:49
【问题描述】:

我在 Linux 容器中运行 ASP.NET Core Web 应用程序。我需要为我的应用程序提供 Windows 身份验证。如何实现?

我假设可以使用可以通过 Kerberos 进行身份验证的反向代理服务器来解决问题。

【问题讨论】:

    标签: linux asp.net-core active-directory kerberos


    【解决方案1】:

    从 ASP.NET Core 3.0 开始,现在可以通过添加 Microsoft.AspNetCore.Authentication.Negotiate NuGet 包并在 Startup.ConfigureServices 方法中使用它来在 Linux 和 MacOS 上使用 Windows 身份验证:

    services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
       .AddNegotiate();
    

    这个在Startup.Configure:

    app.UseAuthentication();
    

    还有一些在the documentation 中描述的额外配置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-01-04
      • 1970-01-01
      • 1970-01-01
      • 2016-01-25
      • 2021-09-08
      • 1970-01-01
      相关资源
      最近更新 更多