[英]Security Integration between Windows Authentication Intranet and ASP.NET Identity MVC Website
I am looking for a solution whereby a pre-authenticated (windows authentication) intranet user can gain access to an MVC Website (ASP.NET Identity) without manually logging in. 我正在寻找一种解决方案,通过预先验证(Windows身份验证)的Intranet用户可以访问MVC网站(ASP.NET身份)而无需手动登录。
The MVC site currently has individual logins for manual login access to none authenticated users which is intended behaviour but what I want to achieve is SSO when accessing the MVC site from the Intranet. MVC站点当前具有单独的登录名,用于手动登录访问未经过身份验证的用户,这是预期的行为,但我想要实现的是从Intranet访问MVC站点时的SSO。 Either by passing an authentication cookie or bearer access token which i can decipher in my MVC website.
通过传递身份验证cookie或承载访问令牌,我可以在我的MVC网站中解密。
I currently have a plain old hyperlink from the intranet with a URL to the MVC application which is protected by a custom authorize attribute...I have overriden the AuthorizeAttribute but need the authentication to persist for the duration of the session. 我目前有一个来自内部网的普通旧超链接,其中包含一个受自定义授权属性保护的MVC应用程序的URL ...我已经覆盖了AuthorizeAttribute但需要在会话期间保持身份验证。
Please can someone provide some guidance on this with example code to generate the web request and the necessary headers and authenticate the windows user within the the MVC AuthorizeCore method? 有人可以通过示例代码提供一些指导来生成Web请求和必要的标题,并在MVC AuthorizeCore方法中对Windows用户进行身份验证吗?
Many thanks, 非常感谢,
Steveo Steveo
Here are the steps to solve your problem. 以下是解决问题的步骤。
Open up Visual Studio 2013, hit FILE->New->Project. 打开Visual Studio 2013,点击FILE-> New-> Project。
Under Project, hit Web->VisualStudio2012-> ASP.NET MVC4 Web Application. 在Project下,点击Web-> VisualStudio2012-> ASP.NET MVC4 Web Application。
<authorization> <allow users="*" /> <deny users="?" /> </authorization>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.