如何使用 Servicestack 在 .NET Core 中使用 Windows 身份验证登录

How to login using Windows Authentication in .NET Core with Servicestack

在以前使用 ServiceStack 的应用程序中,我和我的团队一直在使用 .NET Framework 和包含的 AspNetWindowsAuthProvider。

切换到 .NET Core 后,我们发现包含的提供程序不再在 ServiceStack.Core 中。

如何在 ServiceStack.Core 应用程序中使用 Windows 身份验证?

ServiceStack 没有用于 .NET Core 的内置 Windows Auth Provider,一个潜在的解决方案是使用 ASP.NET Core's Identity Auth with ServiceStack, a pre-configured solution is available from the mvcidentity .NET Core 项目模板。

然后 Configure Windows Authentication in the ASP.NET Core App which is used by the NetCoreIdentityAuthProvider 从经过身份验证的 ASP.NET 核心身份创建经过身份验证的 ServiceStack 会话。