You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The problem occurs in the Authorization Code Flow, when an authenticated client tries to exchange the auth code for an access token. If the client_id field in the request body is filled (along with the authorization header) it causes an INVALID_CLIENT error.
Expected behavior
The specification (https://tools.ietf.org/html/rfc6749#section-4.1.3) states that the field is only required if the client is not authenticated otherwise, but does not states that sending it anyways for authenticated clients should cause an error.
Some tools like springfox/swagger-ui sends the client_id anyways, which causes problems when integrating them.
The text was updated successfully, but these errors were encountered:
If the client_id field in the request body is filled (along with the authorization header) it causes an INVALID_CLIENT error
This is the expected behaviour. If the client credentials are included in the Authorization header and the client_id is also included in the body then this is an invalid request. The client should not attempt to authenticate itself using multiple authentication schemes. Only one authentication scheme should be used, otherwise the request will be rejected.
As @vincent-hsin mentioned, the commit ab09044 will ignore the client_id parameter if the client is authenticating using HTTP Basic.
Describe the bug
The problem occurs in the Authorization Code Flow, when an authenticated client tries to exchange the auth code for an access token. If the client_id field in the request body is filled (along with the authorization header) it causes an INVALID_CLIENT error.
To Reproduce
Example client configuration:
Execute the flow normally:
grant_type: authorization_code
code: the auth code
redirect_uri: http://localhost:8080/swagger-ui/oauth2-redirect.html
client_id: my-awesome-client
Expected behavior
The specification (https://tools.ietf.org/html/rfc6749#section-4.1.3) states that the field is only required if the client is not authenticated otherwise, but does not states that sending it anyways for authenticated clients should cause an error.
Some tools like springfox/swagger-ui sends the client_id anyways, which causes problems when integrating them.
The text was updated successfully, but these errors were encountered: