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.
First, I got UserInfo object thanks by following nice direction. https://oauthssodemo.appspot.com/step/1
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
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.
Open the IAM console at https://console.aws.amazon.com/iam/ . In the navigation pane, choose Identity providers, and then choose Add provider. For Configure provider, choose OpenID Connect. For Provider URL, type the URL of the IdP.
For adding a Spring Boot Security to your Spring Boot application, we need to add the Spring Boot Starter Security dependency in our build configuration file. Maven users can add the following dependency in the pom. xml file. Gradle users can add the following dependency in the build.
OpenID Connect is built on the OAuth 2.0 protocol and uses an additional JSON Web Token (JWT), called an ID token, to standardize areas that OAuth 2.0 leaves up to choice, such as scopes and endpoint discovery.
here is a sample minimal project integrating Google Open Id Connect with Spring Security: https://github.com/fromi/spring-google-openidconnect The key point for me was to rely heavily on Spring OAuth2 to minimize the configuration required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With