如何做到既Azure中的Active Directory单点登录和ASP.NET MVC窗体身份验证 [英] How to do both Azure Active Directory Single Sign On and Forms Authentications on ASP.NET MVC

查看:493
本文介绍了如何做到既Azure中的Active Directory单点登录和ASP.NET MVC窗体身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们必须通过MVC 4使用窗体身份验证和基本身份验证的Web API开发的遗留系统(没有OWIN到目前为止)。

We have the legacy system developed by MVC 4 using Forms Authentication and Basic Authentication for Web API (there is no OWIN so far).

现在我们有很多客户的哪个想对我们的系统单点登录,所以我们使用的Azure的Active Directory(AAD)来存储客户端的用户。

Now we have lots of clients which want to do single sign on into our system, so we use Azure Active Directory (AAD) to store client's users.

现在的情况是,我们要修改的登录流程与AAD适应。登录页面没有任何变化,引擎盖下,我们检查用户是否在我们的系统中存在(使用我们的数据库),它允许用户访问。如果没有,我们继续检查AAD的用户,我们不希望再直接到Azure的登录页面,在这种情况下。

Now the situation is we want to revise the login workflow to adapt with AAD. The login page has no changes, under the hood, we check whether user exists on our system (using our database), it allows user to access. If not, we continue to check user on AAD, we don't want to re-direct to Azure login page in this case.

我已经做吨的阅读,但已经没有多少清楚如何做到这一点?我们还考虑升级到MVC 5才能使用OWIN中间件认证,如果它与形势很好。

I have done tons of reading but have not much clear how to do this? We also consider to upgrade to MVC 5 in order to use OWIN middleware authentication if it's fine with situation.

推荐答案

一个可能的解决方案是从AAD应用程序库的使用习惯SSO应用程序。在这样做时,AAD将解析了AAD用户使用登录到系统的形式。当一个已经登录到AAD用户进入应用程序时,AAD浏览器插件或应用程序将自动输入用户名和密码。

One possible solution is to use Custom SSO applications from the Application gallery in AAD. When doing this, AAD will parse the form that the AAD users are using to login to the system. When a user that is already logged in to AAD enters your application, the AAD browser plugin or app will enter the username and password automatically.

更多信息:<一href=\"http://www.edutech.me.uk/microsoft/identity-and-access-management/active-directory/azure-ad-custom-saas-applications-for-any-3rd-party-service/\" rel=\"nofollow\">http://www.edutech.me.uk/microsoft/identity-and-access-management/active-directory/azure-ad-custom-saas-applications-for-any-3rd-party-service/

这篇关于如何做到既Azure中的Active Directory单点登录和ASP.NET MVC窗体身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆