Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is my school's CAS server not redirecting to my site after authenticating?
    primarykey
    data
    text
    <p>I'm trying to make a website that only University of Waterloo students can use. It uses CAS for authentication. I started using the <a href="http://code.google.com/p/django-cas/" rel="nofollow">django_cas</a> package. Followed the steps pretty much dead on. Here are the things I tested for:</p> <p>redirected to CAS login page - pass</p> <p>verify user on the CAS server - pass </p> <p>redirect back to website - fail</p> <p>(UPDATE: adding code to clarify) SOLUTION:</p> <p>It seems I had the CAS_SERVER_URL wrong. The protocol is https instead of http for my school's CAS server</p> <p>cas_django needs little configuration:</p> <pre><code>## in settings.py CAS_SERVER_URL = 'http://cas-dev.uwaterloo.ca/cas/' LOGIN_URL = '/accounts/login/' MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django_cas.middleware.CASMiddleware', ) AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'django_cas.backends.CASBackend', ) ## in urls.py (r'^accounts/login/$', 'django_cas.views.login'), (r'^accounts/logout/$', 'django_cas.views.logout'), ## in views.py @login_required def sample(request): return render_to_response('sample.html') </code></pre> <p>I got a 404 instead:</p> <p>The requested URL /cas/login/http://uwnetwork.shaon.ca/accounts/login/?next=%2Fsample%2F was not found on this server.</p> <p>Anybody know why it would fail to redirect? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload