我有一个Rest Web Services应用程序和Admin web应用程序,
Rest web服务将与移动交互,其中管理web应用程序将用于维护目的。
对于webservice应用程序和amin web应用程序,凭证都是相同的。
所以我需要josso来提供单点登录。
您能帮助一下如何启动配置吗?我已经浏览了Josso的网站,那里有基本的信息。如果你有配置.Thank的文档,有人能帮我吗?
发布于 2013-10-08 02:17:56
我有一个类似的应用程序设置,其中一个web应用程序提供Rest服务以及面向用户的web应用程序。据我所知,JOSSO将为您提供面向用户的SSO身份验证,并且不打算与rest服务一起使用。
相反,我所做的是在web资源集合下的部署描述符(web.xml)中定义rest服务的URL,这在JOSSO配置下将被忽略。然后,我定义了一个单独的过滤器来单独处理rest身份验证。更确切地说:
web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>public-resources</web-resource-name>
<url-pattern>/restservices/</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
</security-constraint>josso-agent-config.xml
<configuration>
<agent:agent-configuration>
<agent:partner-apps>
<agent:partner-app id="myapplication-sp" vhost="10.1.8.11" context="/myappcontext" ignore-web-resource-collections="public-resources"/>
</agent:partner-apps>
</agent:agent-configuration>
</configuration>有了这个,我可以使用JOSSO来保护我的大部分web应用程序,而忽略我拥有的rest服务。我为我的rest服务(Spring)使用了一个自定义的身份验证过滤器。
希望这能有所帮助!
https://stackoverflow.com/questions/15517311
复制相似问题