Request of bearer token uses wrong Content-Type

Stimulsoft BI Designer discussion
Post Reply
d.pujdak
Posts: 12
Joined: Wed May 13, 2020 3:44 pm

Request of bearer token uses wrong Content-Type

Post by d.pujdak »

Hi everyone,

I have troubles with connecting to OData using OAuth with Bearer.

I have provided the following details:
screen_20240321_1304_330.png
screen_20240321_1304_330.png (24.31 KiB) Viewed 4664 times
I got 400 when I click test connection. After the investigation I have found the following Server Info:
POST: /connect/token
INFO|OpenIddict.Server.OpenIddictServerDispatcher|The request URI matched a server endpoint: Token.
INFO|OpenIddict.Server.OpenIddictServerDispatcher|The request was rejected because an invalid 'Content-Type' header was specified: application/json.
INFO|OpenIddict.Server.OpenIddictServerDispatcher|The response was successfully returned as a JSON document: {
"error": "invalid_request",
"error_description": "The specified 'Content-Type' header is invalid.",
"error_uri": "https://documentation.openiddict.com/errors/ID2082"
}.

Based on the error message I have found that the request for bearer token has wrong content-type (application/json). Is this intentional, can I change it somewhere in options?
Because based on the https://www.rfc-editor.org/rfc/rfc6749#section-4.1.1 it should be using the "application/x-www-form-urlencoded" format.

Please also refer to:
https://datatracker.ietf.org/doc/html/r ... tion-4.3.2
https://stackoverflow.com/questions/409 ... -in-oauth2
https://auth0.com/docs/api/authenticati ... r-password
Last edited by d.pujdak on Thu Mar 21, 2024 12:46 pm, edited 1 time in total.
d.pujdak
Posts: 12
Joined: Wed May 13, 2020 3:44 pm

Re: Bearer token using wrong Content-Type

Post by d.pujdak »

Lech Kulikowski
Posts: 6832
Joined: Tue Mar 20, 2018 5:34 am

Re: Request of bearer token uses wrong Content-Type

Post by Lech Kulikowski »

Hello,

We need some time to investigate the issue, we will let you know about the result.

Thank you.
#14092
Lech Kulikowski
Posts: 6832
Joined: Tue Mar 20, 2018 5:34 am

Re: Request of bearer token uses wrong Content-Type

Post by Lech Kulikowski »

Hello,

The issue is fixed. Please check the next release build.

Thank you.
Post Reply