I have a PHP based application running. The user logins, and does some actions. I have a reverse proxy set up to forward certain requests alone to be handled by the mochiweb server - e.g. any request URL with mysite.com/mochiweb gets routed to the mochiweb server.
Now, my question is how do I authenticate this request using the session information handed out by PHP? I want only the users who have logged in via the PHP front end to be able to access the services of the mochiweb webserver. Any stray requests directly should not be served.