Is Authentication between a PHP section and a Rails Section of a website possible?
The site is currently written in PHP. I want to add a new component by doing it in Ruby on Rail and then installing Rails in a sub-folder.
If a user logs in the PHP portion of the website, can I customize the content for him/her in the Rails section without requiri开发者_JS百科ng a second login?
I'm relatively new to Ruby on Rails so that's why I'm asking all these noob questions.
I guess you add some value to a cookie to authenticate the user.
Cookies are shared between applications. So you can authenticate your user in your rails application.
If you do, in php :
<?php $_COOKIE['foo'] = 'bar'; ?>
Then, in your rails controller, you can do :
method_that_checks_the_user cookies[:foo]
精彩评论