Okta Authentication Django

自作多情 提交于 2019-12-06 00:00:54

You don't have to implement it yourself now. just use the out-of-box solution: https://github.com/fangli/django-saml2-auth

It works with okta smoothly.

P.S. I'm the author of this plugin.

I would recommend using Python Social Auth: http://psa.matiasaguirre.net/ It has a generic SAML backend that you can use. http://psa.matiasaguirre.net/docs/backends/saml.html The documentation is pretty good and extending it is also fairly simple. In my own project we extended it to pull the SAML IdP information from the database, so that we could have users self-service enter that data.

You will need to implement a Single Sign On technology that Okta supports. For Python, the best approach would be SAML as there are multiple python SAML libraries available for use. I suggest reading up on SAML and how it works to get a full understanding. Look here for more information.

When you SAML enable your application, your application will send a SAML request to Okta for authentication. If you don't have an Okta session yet, you will be asked to login. Once you login successfully, Okta sends a SAML response back to your application to let you in. If you do have an Okta session, Okta will just return the SAML response back to the application with out prompting for login.

Each application in Okta can also have it's own login page, that way when a SAML request comes into Okta you can still use your own login page instead of the default Okta one.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!