Ruby on Rails
Wednesday, November 24, 2010
On 24 Nov 2010, at 13:07, Xdmx Xdmx wrote:
This is more complicated. You need to do it in a similar way asomniAuth does for Twitter/Facebook/OpenID/ logins.
could you please explain better this part? or if you have some
docs/posts i can read about
Basically you post the login credentials to your second app through URL+POST parameters, your second app authenticates and sends back the data needed to identify the user, first app uses this to create the session. This is extremely simplified and you'll need to worry about security, establishing trust between the apps etc.
Another way to go about it is to use ActiveResource, which basically establishes interapp communication on a server level.
It all depends on your needs basically. Don't try to overcomplicate matters too much by trying to decentralize too much (decentralization has its uses and advantages, but it also brings a whole slew of extra work).
You should automate it then. You will basically write to the Apachevhost conf files (and possibly the dns server configs) and reload theconfiguration from your Rails app. The main concern here should behandling the security on the system level. As long as the user thengoes to the full domain, all links will stay within that domain.
what about an approach like set a dedicated ip for the app, and in the
apache config accept all the requests to that ip and be managed by the
rails app. In that way the user could simply change the A record of his
domain and it should kinda work (i've not tried it yet, but iirc in the
apache config is possible to do something like this... i don't know with
nginx though)
Could also work.
Best regards
Peter De Berdt
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment