开发者

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]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜