Which CAS implementation to use in django?

Rasmus Kaj picture Rasmus Kaj · Nov 12, 2009 · Viewed 9.2k times · Source

Which CAS implementation should i use to enable CAS single sign on to my django app (trusing a specified CAS server, I'm not interested in creating a CAS provider) ? What I can find are the following:

I've used django-cas before, and it seems to work but seems kind of abandoned? django-cas-consumer at least seems to have more recent activity.

What are the actual pros and cons of each implementation? Are there other implementations I should use?

Answer

Firass picture Firass · Jun 28, 2011

I've been using an older version of django-cas for a long time now, and it works as expected. I've never used django-cas-consumer, but I've looked into it.

Comparing the code between the two projects, it looks like django-cas-consumer is a stripped-down version of django-cas.

The two most glaring differences are:

  • django-cas-consumer only supports CAS version 1
  • django-cas has middleware that captures any requests to the django.contrib.auth.views.login and logout and redirects them to the CAS login and logout views

Also, if you are using Apache, you can consider using mod_auth_cas, which is an official CAS client. Then you can simply use django's remote user authentication.