I've done any number of authentication-integration adapters, and it's best to just use django.contrib.auth.models.User. In your authentication backend, just auto-create an instance of User if the supplied username and password pass authentication. You can use a constant password, after all you're not going to check the Django password anyway, right? Depending on your needs, to may want to copy a little bit of authorization information from the backend into Django as well (e.g., staff status etc.). Remember that if you copy any authorization information you need to re-copy it on every login.
This isn't particular to Django at all. The authentication backends we've done for mediawiki, Drupal, etc. all work the same way -- copy the user to the local db iff they pass authentication and authorization to use the system at any level. orokusaki is right that if you need extra information attached to the User model, a one-to-one relationship is good, but in many situations the username is enough and you don't even need to bother. Leo On Apr 3, 12:22 am, Heit <kirill.kosi...@gmail.com> wrote: > Hello, > > I'm newbie in django, reading documentation i understood that django > authorization model is based on django.contrib.auth.models.User class > and without having an instance of it, it is impossible to maintain > authentication and maybe an authorization. Even if I'll write my own > authentication backend i have to create an instance of > django.contrib.auth.models. User or it's subclass which corresponds to > the record in database table auth_user. Does django support a way of > authentication where i needn't create a record in auth_user table. May > be there is away like java portlet authentication where i can call > something like request.getRemoteUser() ant receive a string > representing an unique key of user and then to use this key in > authentication checks. -- 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.