Java EE integration with .NET for authentication

跟風遠走 提交于 2020-01-06 07:09:40

问题


I have a Java Enterprise Edition web application, a standard WAR. I want to integrate this with an existing .NET infrastructure running IIS. To be specific, I need to be able to share user sessions between the two applications in some secure manner.

Is there a "standard" way of doing this?

Edit: I do not need full session sharing, sorry for not pointing that out. What I need to be able to do is to check if a user is authenticated with the .NET application when she connects to the Java EE application.


回答1:


Create a .NET web service (using WCF, of course) to return whether a user is authenticated. Then call that web service from the Java EE application.




回答2:


Very doubtful.

You'd have to persist session state to a third component, such as a database. I doubt that the built-in providers for either infrastructure are at all similar (as far as schemas, etc); so you'd like have to create your own.

This does not sound like it would be a fun thing to do.




回答3:


If they will run on the same server, you will need an isapi redirect filter, like the isapi_redirect.dll that comes with Tomcat.




回答4:


This open source library, http://spnego.sourceforge.net, will enable your java app to do transparent/integrated windows authentication.

It's installed as a servlet filter so you will not have to write any code.



来源:https://stackoverflow.com/questions/834667/java-ee-integration-with-net-for-authentication

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