-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Describe the bug
The ClientSecretBasicAuthenticationConverter#L89 uses the deprecated ClientAuthenticationMethod.BASIC. This means that if you have a registered client with the ClientAuthenticationMethod.CLIENT_SECRET_BASIC, you cannot request an access token as the check in OAuth2ClientAuthenticationProvider.java#L103 fails.
To Reproduce
- Run the sample authorization server in this repository
- Request an access token:
curl --location --request POST 'http://localhost:9000/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic bWVzc2FnaW5nLWNsaWVudDpzZWNyZXQ=' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=message.read'
- Observe successful response
- Modify the registered client authentication method to ClientAuthenticationMethod.CLIENT_SECRET_BASIC
- Repeat the above request
- Observe 401 response
Expected behavior
Response should be 200 with a valid access token.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug