[Enhancement request] [spring-boot-starter-oauth2-client] ability to change the key "authorization-grant-type" #16372
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: invalid
An issue that we don't feel is valid
type: enhancement
A general enhancement
Context
What are you trying to accomplish?
I am trying to use spring-boot-starter-oauth2-client to get a bearer token, where the service is accepting grant_type=client_credentials and not authorization-grant-type.
What other alternatives have you considered?
Are you aware of any workarounds?
We are authenticating against a third-party service that will provide the token.
if we do this:
Above would work and give up the correct token, which we can use to request a resource server.
We saw Dan Vega's cool video https://www.youtube.com/watch?v=nFKcJDpUuZ8 and wanted to try spring-boot-starter-oauth2-client.
We following his example, we configured as follow:
Expected Behavior
We expected this would work
Current Behavior
Unfortunately, this is not working, as the token provider returns 400 error, as it is expecting grant_type.
We tried to replace configuration with "grant_type: client_credentials" but would get
Caused by: java.lang.IllegalArgumentException: authorizationGrantType cannot be null
Question: Would it be possible to enhance spring-boot-starter-oauth2-client to change the key authorization-grant-type to grant_type?
Thank you for you time.
The text was updated successfully, but these errors were encountered: