What is the best way to开发者_如何学JAVA pass authentication state of the user to the node.js if user has already authenticated in php?
For example - there is an application written in php which needs to use node.js for real-time updates. But those updates should be restricted to logged in users.
What is the best way to do it? Is there a way to access php session data from node.js?
Why you don't just hold node.js behind php and send request only after checking auth. state by php, in this case? Another way you can use the same session storign technique, e.g. memcache/redis/another db, for both of them and just re-check the session data from node.js after creating it by php or vice versa.
精彩评论