Hi everyone,
I have troubles with connecting to OData using OAuth with Bearer.
I have provided the following details:
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
Request of bearer token uses wrong Content-Type
Request of bearer token uses wrong Content-Type
Last edited by d.pujdak on Thu Mar 21, 2024 12:46 pm, edited 1 time in total.
Re: Bearer token using wrong Content-Type
Please also refer this thread: https://github.com/openiddict/openiddic ... issues/437
-
- Posts: 6832
- Joined: Tue Mar 20, 2018 5:34 am
Re: Request of bearer token uses wrong Content-Type
Hello,
We need some time to investigate the issue, we will let you know about the result.
Thank you.
#14092
We need some time to investigate the issue, we will let you know about the result.
Thank you.
#14092
-
- Posts: 6832
- Joined: Tue Mar 20, 2018 5:34 am
Re: Request of bearer token uses wrong Content-Type
Hello,
The issue is fixed. Please check the next release build.
Thank you.
The issue is fixed. Please check the next release build.
Thank you.