I would like to know if there is a library that allow me to use php as apache proxyPass and proxyPassReverse functionality (mod_proxy module).
I try to explain better.
I have to build an api (1; PHP) that after checking validity of oauth2 access_token, switch the request to another internal and privare api (2. JAVA), (adding some user parameters) and return to its client the response of the internal and private api.
I hope there is a library to do this, I wouldn't use rest server and client toghether in the same api, also because methods and content types of requests are very different.
Example:
Mobile app send a request to PHP Webapp (https://my-frontend-app/v2/rest/getUser ... l.jackson/. Php Webapp check if user access_token is valid and switch the request to JAVA Webapp (http://localhost/v2/rest/getUserFriends/michal.jackson/). JAVA Webapp returns a json object to PHP Webapp, and PHP Webapp returns the json object to Mobile app.
Someone can give me some suggestion?
Thank you