Contact Form

Name

Email *

Message *

Cari Blog Ini

Comnimbusdsjoseshadedjsonjsonarray Spring Boot 3

Upgrade Troubles: Spring-Boot 2.3.4 to 2.5.8

Pain Points During Upgrade

Upgrading from Spring-Boot 2.3.4 to 2.5.8 can be a challenging task. One common issue encountered during this process is casting the ID token's "amr" claim to a JSON array.

JSON Parsing with Nimbus-JOSE and JWT

To overcome this issue, users need to cast the "amr" claim to a JSON array by using the Nimbus-JOSE library. This library provides a flexible and convenient way to work with JSON Web Tokens (JWTs). Once the claim is successfully cast, you can access the objects individually based on their index within the array.

Additional Considerations

Another point to note is that JWT parsing in Java can be done using either the Nimbus-JOSE or the JJWT library. If you're using Nimbus-JOSE and attempting to parse a JWS object with a detached and unencoded payload, remember that version 8.15 or later is required.

Additional Resources


Comments