【问题标题】:How to implement Openid connect and Spring Security如何实现 Openid 连接和 Spring Security
【发布时间】:2012-08-04 15:44:23
【问题描述】:

我是身份验证和授权的初学者,但我必须在工作中连接到 openid 连接提供商。我对如何使用 Spring Security 有所了解。

首先,我得到了 UserInfo 对象,感谢遵循很好的指导。 https://oauthssodemo.appspot.com/step/1

然后我在下面找到了一个名为“spring-security-oauth”的出色实现。我可以在tomcat上运行应用程序并成功连接到facebook。
https://github.com/SpringSource/spring-security-oauth

下一步,我想使用“spring-security-oauth”连接谷歌,但我不知道如何完全做到这一点。 (说实话,我不知道openid connect和aouth2有什么区别..)

给我一​​个线索。任何帮助将不胜感激。

【问题讨论】:

  • 您的体验有什么回报吗?参考还是例子?谢谢!

标签: spring-security openid oauth-2.0 google-openid


【解决方案1】:

OpenID Connect 基本要素规范目前位于http://openid.net/specs/openid-connect-basic-1_0.html 对于 Spring 实现各个步骤的具体细节,请构建新问题,进一步详细说明确切的任务 w。河。吨。这个过程。

【讨论】:

    【解决方案2】:

    这是一个将 Google Open Id Connect 与 Spring Security 集成的示例最小项目:https://github.com/fromi/spring-google-openidconnect 对我来说,关键是严重依赖 Spring OAuth2 来最小化所需的配置。

    【讨论】:

      【解决方案3】:

      您可以使用spring-social-google projet 来实现“使用 Google 登录”功能。它在底层使用 OAuth 2.0,但现在它用于 Google+ API 来检索个人资料信息。 I did a fork 使其使用 Google Authentification and Authorization API 这基本上是 openconnect Id 标准

      【讨论】:

        猜你喜欢
        • 2020-01-14
        • 2016-06-28
        • 2021-08-08
        • 2014-02-09
        • 1970-01-01
        • 2017-10-10
        • 2015-02-09
        • 2012-12-22
        • 1970-01-01
        相关资源
        最近更新 更多