Hi *,

I'm trying to set some webservices using rpc4django (cause it supports
also jSON) on Django 1.1.

I followed this

http://packages.python.org/rpc4django/#overview

and this

http://docs.djangoproject.com/en/1.1/howto/auth-remote-user/

so that in my settings.py I have

MIDDLEWARE_CLASSES = (
    # 'django.middleware.cache.UpdateCacheMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.RemoteUserMiddleware',
    [...]
)

and

AUTHENTICATION_BACKENDS = (
    'lfs.customer.auth.EmailBackend',
#    'django.contrib.auth.backends.ModelBackend',
    'django.contrib.auth.backends.RemoteUserBackend',
)

Here's the string I use to connect:

s = ServerProxy('http://admin:ad...@localhost:8000')

With public methods everything works fine (evan without "admin:admin@")
but with protected methods I get a "404 Forbidden".

Debugging trough the request shows me that the user is still anon:

(Pdb) kwargs.get('request').user
<django.contrib.auth.models.AnonymousUser object at 0xa9960cc>

So, it seems to me that the normal http auth doesn't work.

Is this supposed to work and am I missing something or should I handle
login/logout actions within an ad-hoc webservice?

TIA,
SimO

-- 
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.

Reply via email to