Kotlin + Spring Boot + Keycloak - Securing REST APIs
Hello everyone, In this article, we will learn how to secure the Kotlin + Spring boot REST APIs with Keycloak. GitHub repository link is provided at the end of this tutorial. Technologies Used: Kotlin Spring Boot 2.5.5 KeyCloak 15.0.2 Gradle Let's begin our journey, Keycloak - Environment Setup Let's download the Keycloak-15.0.2 Standalone server distribution from the official source. Once we've downloaded the Standalone server distribution, we can unzip and start Keycloak from the terminal: In Windows unzip keycloak-12.0.1.zip cd keycloak-12.0.1/bin/ standalone.bat In Linux / Unix $ sudo tar -xvzf keycloak-12.0.1.tar.gz $ cd keycloak-12.0.1/bin/ $ ./standalone.sh Create Keycloak Server Initial Admin Go to http://localhost:8090/auth/ and fill the form in the Administrator Console part. For the purpose of this exercise, knowledgefactory / password will be enough. Then you should be able to log in to Keyc...