nitmir / django-cas-server

A Django Central Authentication Service server implementing the CAS Protocol 3.0 Specification
GNU General Public License v3.0
131 stars 44 forks source link

CAS SSO using CASTGC #79

Open KenWhitesell opened 2 years ago

KenWhitesell commented 2 years ago

I have recently implemented a custom LoginView (descending from CAS's LoginView) that supports the use of the TGT / CASTGC method of supporting SSO across different sites.

It works by overriding the get, post, and init_form methods of the original class, along with implementing new valid_tgt, process_tgt, gen_tgt and set_cookie methods. There's also a new TgtUser model created to store the currently-active TGT for an authenticated user.

Do you have any interest in possibly adding these to the project? I'd be happy to clean them up and submit them as a PR. There are a couple items that I would like to discuss before doing this regarding what elements should be made configurable through settings in the settings file.

I also have a couple of test Django projects built that can be run to demonstrate that it works as intended.