SAML SSO Authentication with Django REST Framework

社会主义新天地 提交于 2020-01-13 06:51:48

问题


I'm currently working on a AngularJS front-end and Django REST back-end. I've been using django-rest-auth in the past to authenticate my connections between the two, but I now have to integrate a SSO authentication using SAML.

I've looked around and decided to use python3-saml, but any of the documentation and use case examples (for this package and any other) are applied for pure Django applications.

I've been basing myself on OneLogin's django/flask guide and I tried making a custom Middleware that would catch my requests, but the implementation of the redirects provided by OneLogin does not work with REST call (obviously). I've also seen some people using the AUTHENTICATION_BACKENDS Django setting and I'm wondering if it's maybe more what I'm looking for.

Thank you for any help.


回答1:


So after more research and trials, I've gone with django_saml2_auth instead. It's pretty much plug and play, but I had to remove Token authentication and use Basic and Session authentication.



来源:https://stackoverflow.com/questions/46473893/saml-sso-authentication-with-django-rest-framework

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