Thursday, February 27, 2014

Question about populating user data with Django-cas

Hi guys,

I'm having trouble getting the example code that is posted in the overview document for django-cas to work.  Here is my relevant code:

cas_backend.py:

from django_cas.backends import CASBackend

class PopulatedCASBackend(CASBackend):
   
    def authenticate(self, ticket, service):
        user = super(PopulatedCASBackend, self).authenticate(ticket, service)
        print("hello world!")

        return user

settings.py:

...

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    #'django_cas.backends.CASBackend',
    'mail_site.cas_backend.PopulatedCASBackend',
)

...

When I run my website and try to log in to the cas server, I get a 403 error after entering my username/password and clicking log in.  Why would this be happening?

Jared

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/51237db1-19e7-42d1-b184-f28f51dfd6a4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment