Django integration - wrighting/cas_wsgi_middleware GitHub Wiki

There are two options for how to handle Django integration

#WSGI# Django WSGI deployment guide

#Django Middleware#

This works in a very similar way to 'django.contrib.auth.middleware.RemoteUserMiddleware' so it's best to follow the documentation there.

In short you must first add 'cas.djangocas.DjangoCAS' to MIDDLEWARE_CLASSES after the AuthenticationMiddleware.

You then need to ensure the AUTHENTICATION_BACKENDS is set to 'django.contrib.auth.backends.RemoteUserBackend'