Tag: keycloak

  • How to implement authorization using JWT/OAuth2 in Spring Boot?

    There are two main aspects in Security: Authentication deals with whether the user who tries to access an application is a legitimate user. Authorization deals with whether the user has rights to read/modify a particular resource in the application. In this post let us look into authorization in Spring Boot. Let us consider an application…

  • How to protect your Spring Boot microservice with OAuth2?

    Protecting your microservice developed in Spring Boot is quite forward. Spring does all the major work for you. Here are the steps to follow: STEP 1: Add spring boot starter oauth2 resource server dependency STEP 2: Configure Authorization Server STEP 3: Test STEP 1: Add spring boot starter oauth2 resource server dependency Add the below…

  • How to set up KeyCloak for OAuth2 client credentials flow?

    We live in the age of microservices. Microservices are often deployed as REST APIs. And the most popular way to protect and access these REST APIs is through OAuth2 protocol. And in OAuth2 protocol ,the preferred way to protect REST APIs is through client credentials. To set this, You first need an Identity and Access…