From One Devise Rails 3 app to another

17 views
Skip to first unread message

Bharat

unread,
Apr 5, 2011, 7:04:12 PM4/5/11
to Devise
This is a bit hokey, but I am experimenting with Server to Server
communication - in my case both running Rails 3/Devise apps.

I want to make an HTTP call using HTTParty gem from within one
application into another. When I make a call, the server correctly
says connection refused since the calling server is not
authenticated. But I know the email/password of a valid user in the
server that is being called. So what kind of http call should I make
from the calling server to authenticate the user and then make the
"real" call?

Thank you.

Bharat

Andrés Mejía

unread,
Apr 5, 2011, 8:05:02 PM4/5/11
to plataforma...@googlegroups.com
I think the easiest way is to use HTTP Authentication. That way, you can send the user's credentials on the HTTP request without any additional hassle.

The other option is to make a POST request to the login action (the one the login form would usually POST to) and then pass the session cookies around, but that's more cumbersome.
Reply all
Reply to author
Forward
0 new messages