Tag: OAuth2

  • How to invoke OAuth2 protected microservice using WebClient in Spring Boot?

    Let’s say you want to call an OAuth2 protected microservice from your Spring Boot microservice application. Spring Boot as usual does majority of the work for us. We just need to add a dependency ,some configuration and using a single HTTP call using Spring Web Client we can invoke the microservice. Before that , to…

  • 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…