NimbusOpaqueTokenIntrospector.requestHeaders defines the header MediaType.APPLICATION_JSON_UTF8 which seems to be deprecated. In this bug report there's some details about it: https://github.com/spring-projects/spring-framework/issues/22788

The IDP I'm currently using actually rejects the request to the token endpoint because of this, returning a message stating that the response mode is not supported.

It is possible to workaround this issue by setting a new converter using setRequestEntityConverter, with a converter that sets the MediaType.APPLICATION_JSON instead of the MediaType.APPLICATION_JSON_UTF8. However, shouldn't application/json be the configured MediaType by default?

Thank you in advance.

Comment From: jzheaux

Agreed, @pedrodovale, that this would be a good change. Are you able to provide a PR?