The solution was to set CAS_AUTO_CREATE_USERS
to True
, add 'django_cas'
to INSTALLED_APPS
and finally sync database.
Django-cas - 403 error after successful logging in
سؤال
I'm trying to include CAS authentication in my website. I installed https://github.com/KTHse/django-cas2 and configured MIDDLEWARE_CLASSES, AUTHENTICATION_BACKENDS and CAS_SERVER_URL (as in README.md). I also setup own CAS server on localhost. In my urls.py I have:
...
url(r'^accounts/login/$', 'django_cas.views.login'),
url(r'^accounts/logout/$', 'django_cas.views.logout'),
...
When I'm visiting accounts/login/ it redirects me to CAS server site. But after successful log in, CAS server site redirects me back to accounts/login/?next=%2F&ticket=ticket_here and this URL gives me 403 error, none cookies are setted. What I should do to get it working?
PS. In cmd I get error: No handlers could be found for logger "django_cas.backends"
المحلول
لا تنتمي إلى StackOverflow