问题描述
我是身份验证和授权的初学者,但是我必须在工作中连接到openid连接提供程序.我对如何使用Spring Security有所了解.
I am beginner of authentication and authorization but I have to connect to a openid connect provider on my job. I know a little about how to use Spring Security.
首先,通过遵循正确的指导,我得到了UserInfo对象. https://oauthssodemo.appspot.com/step/1
First, I got UserInfo object thanks by following nice direction.https://oauthssodemo.appspot.com/step/1
然后,我在下面找到了一个名为"spring-security-oauth"的出色实现.我可以在tomcat上运行该应用程序并成功连接到Facebook.
https://github.com/SpringSource/spring-security-oauth
And then I found a great implementation named "spring-security-oauth" below. I could run the app on tomcat and connect to facebook successfully.
https://github.com/SpringSource/spring-security-oauth
下一步,我想使用"spring-security-oauth"连接google,但我不知道该怎么做. (说实话,我不知道openid连接和aouth2有什么区别.)
As next step, I want to connect google by using "spring-security-oauth" but I do not know how to do that completely. (To be honest, I do not know how differences openid connect and aouth2..)
给我一个提示.任何帮助将不胜感激.
give me a clue. Any help will be appreciated.
推荐答案
以下是将Google Open Id Connect与Spring Security集成的最小示例项目:对我来说,关键点是严重依赖Spring OAuth2来最大限度地减少所需的配置.
here is a sample minimal project integrating Google Open Id Connect with Spring Security: https://github.com/fromi/spring-google-openidconnectThe key point for me was to rely heavily on Spring OAuth2 to minimize the configuration required.
这篇关于如何实现Openid Connect和Spring Security的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!