bfrederi wrote: > I am writing my own custom authentication for AD/ldap and I am trying > to authenticate the user without saving the user in the Django User > table. I also don't want the user to have to log in every time they > want to view something. Is there any way to not save the user in the > Django User table and keep them authenticated? I don't require them to > access admin or anything, I just need them to be authenticated. > > So far I have this as my backend (the ldap backend it falls back on > after the default backend): > http://dpaste.com/hold/128199/ > > But when I use that code, it is still saving the User model instance. > I know, because the next time I log in I get a "Duplicate entry". I > don't want to have to make a user for every person that logs into my > django site via their ldap credentials if I can avoid it.
It isn't clear to me that you want to avoid the effort of putting a user in or whether you really want to avoid having them in the Django database. If you just want to avoid the effort and don't mind them being in there I can recommend Peter Herndon's django_ldap_groups ... http://code.google.com/p/django-ldap-groups/ ... which I have recently installed and it works very well. This kit automatically inserts the user from the AD or eDirectory into the Django database complete with whatever info you want to extract and also putting them into Django groups you have related to AD or eD groups. This lets users login with ldap auth and if the ldap server is down they can log into the Django app using Django auth. Regards Mike I would > greatly appreciate it if someone could point me in the right > direction, or tell me what I'm doing wrong. > > -- > > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@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. > > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.