On 25 fév, 11:28, Benedict Verheyen <benedict.verhe...@gmail.com> wrote: > Hi, > > i have 2 sites that use the standard Django authentication system. > I use the first site, say site A, as the site to manage logon's. > My point is to achieve that when a user is logged in on site A, he/she is > automatically logged in on site B. > > Now, when a user visits site B, he/she gets redirected to site A to get > authenticated (Active Directory) > After I authenticate the user, i would want to use that User object in site B. > > Sending the session key of site A to site B doesn't work as the projects have > their own database. > I then tried to put the user object on the cache (i use memcached) and > sending the cache key to site B. > I can get the user object in site B but when i want to log in using the > standard > login(request, user); i get this error message: > > django.core.exceptions.ImproperlyConfigured > ImproperlyConfigured: Error importing authentication backend > siteA.auth.ldap_authenticate: "No module named siteA.auth.ldap_authenticate"
Won't work that way. > I need to set the user object in site B to get the user info (I display the > username on every page amongst other data) > > Is that even possible? Yeps, using multi-db support (to share the user tables) and a custom auth backend (so your siteB delegates auth to SiteA) : * http://docs.djangoproject.com/en/1.2/topics/db/multi-db/ * http://docs.djangoproject.com/en/1.2/topics/auth/#other-authentication-sources HTH -- 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.