On Tue, 2009-08-04 at 06:28 -0700, lfrodrigues wrote: > Hi, > > I've developed a special Auth backend for a internal communication > protocol. Everything was ok but now the requirements changed and I > need to allow on the same browser (in diferent tabs) several logged > users. > > How can I have (in the same browser process) several logged users at > the same time?
This is not particularly easy, but it's not impossible. The default Django session/auth combination stores the current sessionid in a cookie. That cookie is per-browser (since that's how cookies work), so you need to avoid collisions there. In fact, it seems like you'll have to end up writing your own session replacement and auth middleware to correctly set the User instance in the session. There's really no way to know which tab or window submitted the URL from a single browser, so you'll also need to include some information about hte current user in the URL so that the server side can work out which user you're meant to be inpersonating for this particular request. This is why RESTful design encourages staying away from cookies for this sort of purposes, because it's not stateless. Django's session framework is not RESTful and you're seeing the results of that. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---