【发布时间】:2017-12-31 19:26:52
【问题描述】:
我有一个 ASP.net Core (.net framework 4.7) 应用程序,它使用 cookie 身份验证,就像 this link 中的一样
app.UseCookieAuthentication(new CookieAuthenticationOptions()
{
AuthenticationScheme = "CookieAuthentication",
LoginPath = new PathString("/Login/"),
AccessDeniedPath = new PathString("/Login/"),
AutomaticAuthenticate = true,
AutomaticChallenge = true
});
我想要做的是允许 Windows 身份验证和 Cookie 身份验证。因此,如果用户在公司的域中,他/她不必输入用户名和密码。但如果他们来自外部域,他们会被重定向到登录页面并输入他们的用户名和密码以进行身份验证.
【问题讨论】:
-
目前如何认证外域用户?
-
我通过 cookie 身份验证来做到这一点。
标签: asp.net-core active-directory asp.net-core-mvc windows-authentication asp.net-core-middleware