On 24 Nov 2010, at 13:07, Xdmx Xdmx wrote:
This is more complicated. You need to do it in a similar way as
omniAuth does for Twitter/Facebook/OpenID/ logins.
could you please explain better this part? or if you have some
docs/posts i can read about
http://www.windley.com/archives/2006/04/how_does_openid.shtml
http://en.wikipedia.org/wiki/OpenID
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 Apache
vhost conf files (and possibly the dns server configs) and reload the
configuration from your Rails app. The main concern here should be
handling the security on the system level. As long as the user then
goes 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
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.