4
我现在有一个自我托管Owin的应用程序,在Windows这样运行:Windows身份验证,而托管在Linux上与ASPNET核心
public class Program
{
private static void Main(string[] args)
{
using (WebApp.Start<Startup>("http://localhost:9000"))
{
Console.WriteLine("Press Enter to quit.");
Console.ReadKey();
}
}
}
public class Startup
{
public void Configuration(IAppBuilder app)
{
var listener = (HttpListener) app.Properties["System.Net.HttpListener"];
listener.AuthenticationSchemes = AuthenticationSchemes.IntegratedWindowsAuthentication;
app.UseNancy();
}
当一个请求时,用户使用其Windows域凭据验证。
对于ASPNetCore,我想知道是否有类似的设置可以使用,但应用程序使用Kestrel Web服务器在Linux上运行。
我听说过各种选项,如Windows 2016和OpenIdConnect中间件可能工作,或者我可以使用IdentityServer在Windows上运行,但在Linux上的应用程序,但我假设中间件将是必需的,我也不清楚是否会有一个“认证舞蹈”意味着它可能不像我现在所拥有的那样无缝。
任何意见和/或代码示例将不胜感激。
感谢