SSO between ASP.Net and JSP

半腔热情 提交于 2019-12-11 18:54:25

问题


I built an ASP.Net MVC 4 application which uses forms authentication by means of a custom membership provider inheriting from the Simple Membership.

Everything is working fine, but now I have a new requirement: I need to integrate a JSP application with mine.

This means that it has to authenticate against the same user database of my application and that they should somehow share the session in order to achieve a kind of Single Sign-On among the two applications (if an user is already authenticated in the ASP.Net application, he should be able to access the JSP application without logging in again, and vice-versa).

What architecture do you suggest me to use?

I would like to change as little as possible the ASP.Net application.

Thanks!


回答1:


If you need to auhtenticate accross different domains:

You can implement your own security token service (like facebook, google does) Here is some ready to use implementation: http://thinktecture.github.io/Thinktecture.IdentityServer.v2/

If the sites are running on the same domain (subdomain), then you can try to share an authentication cookie within these domains.

An explaining article: http://www.codeproject.com/Articles/106439/Single-Sign-On-SSO-for-cross-domain-ASP-NET-applic



来源:https://stackoverflow.com/questions/21254796/sso-between-asp-net-and-jsp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!