Find detailed info on medium https://ravthiru.medium.com/springboot-oauth2-with-keycloak-as-provider-c31b2897e913
The springboot-Keycloak
demonstrates how to configure Springboot OAUth2
to use Keycloak as Provider. We write a Springboot application and secure it with Keycloak
then display Authenticated user details using Thymeleaf UI.
All you need to build this project is
- Java 11 (Java SDK 1.11) or later
- Gradle
- Keycloak Server version 16+
-
Open a terminal and navigate to the root directory of this springboot-Keycloak.
-
Build application
gradle bootRun
-
Build and Start springboot-keycloak application using below command
gradle bootRun