[Solved]-Making SSO with django rest framework

2👍

What you can do is take django-rest-auth project https://github.com/Tivix/django-rest-auth and run it as a central authentication server on let’s say app-3 and make calls to it for authentication from app-1 and app-2.

It would require you to consolidate your user DB and have it served from one restful auth service. You would still need to write a restful cas client thou that would process the authentication for you, Or you can just repurpose the ng-cas code for this, All it does is it takes the ServiceTicket returend by the mama-cas server and creates a session in django auth based on it and optinoally creates a user as a stub in the client server db.

Another alternative is to make mama-cas restful. All mama cas does is creates a ServiceTicket model object on succesful login and sends it over to the client which consumes ‘service’ and ‘ticket’ params and creates authentication session. Authentiation session is created whether you are restful or not, it’s part of django architecture to provide authentication.

What we did at likalo to consolidate our services was take the django-mama-cas server and made it semi restful. It’s on my road map to make it 100% restful using this approach.

Hope this helps…

Leave a comment