Home > Software engineering >  How do I implement single sign on Django with Azure Ad. Any clues are highly appreciated
How do I implement single sign on Django with Azure Ad. Any clues are highly appreciated

Time:05-30

Hi I am creating a web application in Django that integrates with Azure AD. My goal is to enable single sign on capability to my web application and I'm not sure about where to start. Please help with good references. Djangorestframework integration will be helpful

CodePudding user response:

Please refer this SO thread

If you want to implement on server

  • Make sure to Add simple_sso.sso_server to INSTALLED_APPS, Create an instance of simple_sso.sso_server.server.Server and include valueget_urls method

If you want to implement on Client

  • Create a new instance of simple_sso.sso_server.models.Consumer on the Server. add SIMPLE_SSO_SECRET and SIMPLE_SSO_KEY provided by server model simple_sso.sso_server.models.Client
  • Add SIMPLE_SSO_SERVERwith correct url to root simple_sso.sso_server.urlswhere you include on server and add simple_sso.sso_client.urls on client.

To configure setting's in python Replace your AUTH_ADFS with this.

To do so, login to your ADFS server and click the relying party trust created with the Django app and check all the details regarding the federation properties like data XML link, claims and attributes passing rules, etc ..

For more information in detail, please refer below links:

GitHub - divio/django-simple-sso

Implementing Single Sign On (SSO) using Django

python - How to implement single sign-on django auth in azure ad? - Stack Overflow

  • Related