Closed dnconan closed 3 years ago
Hi @dnconan,
thanks for the detailed error description. The error you're seeing is due to com.nimbusds:nimbus-jose-jwt:jar:9.1.2 library that is incompatible with xsuaa-spring-boot-starter 2.8.0
I can see from dependency tree that even with spring-oauth2-jose 5.3.4 RELEASE that uses 8.19 nimbus-jose-jwt version. In your case version is overwritten to 9.1.2
[INFO] +- org.springframework.security:spring-security-oauth2-jose:jar:5.3.4.RELEASE:compile
[INFO] | \- com.nimbusds:nimbus-jose-jwt:jar:9.1.2:compile
In this case I would suggest to explicitly define the nimbus-jose-jwt version to the last compatible version: 8.20.1 in your pom file.
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>8.20.1</version>
</dependency>
References #414
Best Regards, Liga
Hi @liga-oz,
Thank you for your quick help, it really hits the point!
After I explicitly define the nimbus-jose-jwt version to the last compatible version: 8.20 in my pom file, it works !
However, a little confusion that xsuaa-spring-boot-starter 2.8.0 not compatible with latest nimbus jar but the older one. Is there something wrong on backward compatible or development lifecycle...
Anyway, much appreciate for helping on this issue!
Best regards, Dnconan
If you want to continue using version 9.0+,need to upgrade spring-security-oauth2-jose
I have a basic SpringBoot 2.4.0 app. Using Spring Initializer, upload app to SAP Cloud Platform to run with HANA, and package as an executable JAR file with some RestControllers.
Without security configurations, everything is fine. But after add
In 1 of the controller this is the body I send any request (with correct user access), it fails with below error:
The Maven dependency tree is
Web secure configuration class is
I will have HTTP500 error instead of 401 and 403, I tried every possible thing but still not working, including Oauth 2.0 Integration Sample: java.lang.NoSuchMethodError: com.nimbusds.jose.Header.toJSONObject() · Issue #122 · spring-projects-experimental/spring-authorization-server · GitHub
Any expert could provide any resolution to this error? Much appreciation in advance!!