dchandek wrote:
> I've looked at authentication backends and middleware, but it looks
> like the default Django installation expects users to login through a
> Django form.
Default system insist on storing logged user credentials in a session
(though they can be of any nature). In your case you would have to
create your own middleware. Which is quite simple:
class RemoteUserAuth:
def process_request(request):
from django.contrib.auth.models import User
username = request.META['HTTP_REMOTE_USER']
request.user = User.objects.get_or_create(
username=username,
defaults={...})
`defaults` are values for creating new user, refer to User model for
available fields.
You are not even bound to use a built-in User model however it's
recommended because with it you get some little nice things like user
messages, permissions etc.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---