Support Sending Json Body instead of Multipart Form Data during WebClientReactive ClientCredentials TokenRequest #14404
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
I want to send the Oauth Token request sent in case of Grant type Client Credentials as a JSON object
{
"grantType" : "client_credentials"
}
instead of Form data
grant_type=client_credentials
Currently in those discussions I found two approaches
#7781
#8612
One solution is create custom OAuth2ClientCredentialsGrantRequestEntityConverter and other is to use Filters along with BodyInserters, but in both solutions we are able to add/edit the form data object only and not replace it with a json body.
When I try this approach, I can edit the whole body to a String...but I need it to go as Json Object and not Json String enclosed within "" as this below code does
and for OAuth2ClientCredentialsGrantRequestEntityConverter had method createParameters which is supposed to return MultiValueMap<String, String> ....which is again map for constructing form data...so changing request body to Json here wont be possible
The text was updated successfully, but these errors were encountered: