Recently we migrated from spring boot 2.x to 3.x when i tried hit a restapi through restclinet i am getting exception.
After migrating we have springweb 6.x and oauth2 2.4 as our dependencies.
I went through the code base of both dependencies I find out that
In springweb 6.x ClientHttpResponse returning HttpStatusCode
In Springweb 5.3.x ClientHttpResponse returning HttpStatus
But in oauth2 handler it is expecting HttpStatus, but spring web 6 returning HttpStatusCode
How can we fix this incompatible can some help with solution to get rid of this error.
5.3.x code : https://github.com/spring-projects/spring-framework/blob/5.3.x/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java 6.x code : https://github.com/spring-projects/spring-framework/blob/6.0.x/spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java
spring-security-oauth
is just not compatible with Spring Security 6 / Boot 3 and it won't be:If you're looking for something simpler than
spring-boot-starter-oauth2-client
andspring-boot-starter-oauth2-resource-server
, you can have a look at this starter I wrote.If you're looking at something requiring less code than
spring-authorization-server
, then have a look at products like Keycloak or cloud offers like Auth0, Amazon Cognito, Okta, ...