Linux上的ASP.NET Core Windows身份验证

问题描述 投票:3回答:1

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

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

linux asp.net-core active-directory kerberos
1个回答
4
投票

[从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中描述的一些其他配置。

© www.soinside.com 2019 - 2024. All rights reserved.