我在Linux容器中运行ASP.NET Core Web应用程序。我需要为我的应用程序提供Windows身份验证。如何实现?
我认为可以使用可以通过Kerberos进行身份验证的反向代理服务器来解决此问题。
[从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中描述的一些其他配置。