Is there an elegant way to integrate code performing authentication on other php site into Devise?
已查看 25 次
跳至第一个未读帖子
stanislaw
未读,
2012年6月19日 20:14:282012/6/19
回复作者
登录即可回复作者
转发
登录即可转发
删除
您无权在此群组中删除帖子
复制链接
举报消息
请登录以举报消息
显示原始帖子
要么此群组的电子邮件地址为匿名状态,要么您得查看成员电子邮件地址权限才能查看原始帖子
收件人 Devise
I am developing Rails application, in which I need to authorize users
from other site written on PHP.
The APIs of PHP site written by its developer are custom i.e. they are
not OmniAuth or similar.
I wonder, if there is elegant way to somehow integrate my code sending/
receiving JSON responses to/from PHP site into Devise, so it could
work like I am doing authentication of users in usual Devise way from
my app.
I think you may need too much customization to get this done, which may lead me to think it's not worth to use Devise at all - unless you need more features that Devise can give you.
In any case, if you want to give it a try, I think you could start by writing a custom strategy that talks to your PHP API, and use it with Devise. You can take a look at Devise strategies to base your work.