Web services 使用apache2 php页面和tomcat REST调用进行身份验证

Web services 使用apache2 php页面和tomcat REST调用进行身份验证,web-services,rest,authentication,tomcat,apache2,Web Services,Rest,Authentication,Tomcat,Apache2,你好,stackoverflow上的聪明人, 如果有人能给我指出正确的库/框架来做我想做的事情,我会非常高兴 我们设置了以下web体系结构。 1. We have a tomcat server that offers REST services. 2. We have an apache2 server that serves up php pages to users. a. Some of these php pages make REST calls to tomcat fo

你好,stackoverflow上的聪明人,
如果有人能给我指出正确的库/框架来做我想做的事情,我会非常高兴

我们设置了以下web体系结构。

 1. We have a tomcat server that offers REST services.
 2. We have an apache2 server that serves up php pages to users.
    a. Some of these php pages make REST calls to tomcat for data.
    b. Other php pages contain javascript that makes REST calls that are routed through apache2 via mod_proxy to tomcat. e.g. All request to http://myapache.com/PASSTOTOMCAT/rest/getSecureData would go to tomcat.
现在,我被要求向所有内容添加身份验证,包括用户页面和其余调用。显然,用户只需登录一次就可以访问这两个站点

我可以用什么图书馆来做这个?我认为我不能使用任何基于php的解决方案(即,涉及添加一个)因为传递url将没有机会添加此代码并检查身份验证。我想我需要使用apache2本身内置的东西

一个次要要求是,我希望将用户凭据存储在mysql数据库中,而不是文件中

我是不是想得太多了


提前谢谢

已经5天了,所以我想我会回答我自己的问题

我最终使用了新的mod_auth_表单进行身份验证,因为它允许您使用一个漂亮的样式化网页来登录用户。 我还使用mod_dbd访问mysql中的用户凭据

我找不到一个很好的教程,所以我在安装和设置过程中遇到了一些困难,但是如果有人关心的话,我在我的博客上创建了一套说明,以防其他人尝试做同样的事情。