Spring Boot 3.4.x Oauth2 Client using RestClient, no reactive dependency

Karanbir Singh
4 min readDec 9, 2024

Prior to Spring boot 3.4.x(backed by Spring security 6.4.x) the spring framework worked quite well with Oauth2 Clients but that was not just perfect.

A developer who had no use of webflux/ reactor libraries in general, had to unnecessarily include them without actually needing them otherwise.

If not a medium member, please refer the link here. Knowledge should be 100% free! Please support me by following me & reacting to the post.

Spring came up Spring boot 3.4.x around 21st novemeber 2024.

It removes the need of the Webflux/reactor, etc. to be part of the project now.

This blog is kinda a POC for that bit. Plus added bonus of the various possible customisations focusing around mutual/client authentication aka MTLS(or MASSL)

Important ➫ this covers the client credentials grant type only for the sake of simplicity. But can prove to be an important reference for other variants of grant types.

Prerequisites

➫ A fair enough capable machine.
➫ JDK 21 (17 should also be fine)
➫ Maven, IDE
➫ Some knowledge on TLS, MTLS.
➫ OPENSSL or STEP CLI
➫ Basic knowledge to clone Git repos :-)
➫ Concept around Oauth2 should also be clear.

--

--

Karanbir Singh
Karanbir Singh

Written by Karanbir Singh

API developer + Web Application developer + Devops Engineer = Full Stack Developer

No responses yet