【问题标题】:OpenID connect based authentication in Angular.js with (drf oidc) Django rest framework backendAngular.js 中基于 OpenID 连接的身份验证与(drf oidc)Django rest 框架后端
【发布时间】:2017-04-20 19:55:36
【问题描述】:

有没有办法为后端和前端编写逻辑?

在我目前的流程中,我们正在使用 Django rest-framework 登录,现在我们需要在我们的项目中集成 OpenID connect SSO,所以请指导我如何将 OpenID connect SSO 与 Django-rest 框架集成。

有 GitHub 示例吗? 我正在寻找示例代码。

【问题讨论】:

    标签: python angularjs django-rest-framework openid-connect


    【解决方案1】:

    我们可以使用隐式流,我添加了一个如何将 OIDC 与客户端应用程序一起使用的示例。

    前端获取访问令牌:http://django-oidc-provider.readthedocs.io/en/develop/sections/examples.html#pure-js-client-using-implicit-flow

    您还必须在后端验证 ID_TOKEN:

    https://openid.net/specs/openid-connect-implicit-1_0.html#IDTokenValidation

    示例代码:https://github.com/ranvijay-sachan/django-rest-login-and-social_auth

    我已经使用 Google open id connect 对任何 SSO 提供商进行了测试,您可以使用 python social auth 添加以下代码:

    how can we integrate any SSO provider using python social auth openid connect?

    【讨论】:

      【解决方案2】:

      这里有带有 django-rest-framework-jwt 的用户 angualr Js

      https://github.com/rmemon/Angular-JS-django-rest-framework-jwt

      【讨论】:

      • 我们如何将 google OpenID 与相同的连接集成。Rahil 我知道 oauth2 流程,我能够集成 oauth2,但在这里我有不同的要求,如果您有任何想法,请提出建议。谢谢。
      • 我会尽快更新,谢谢——ranvijay
      猜你喜欢
      • 2013-10-25
      • 2013-11-10
      • 2021-05-10
      • 2015-07-31
      • 2021-06-05
      • 2023-04-07
      • 2013-06-29
      • 2017-09-26
      • 2017-11-02
      相关资源
      最近更新 更多