spring-projects / spring-projects/spring-security
Not able to add custom parameters to OAuth Token Request
Open
Nobody has claimed this yet.
status: feedback-provided
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Summary
Not able to add custom parameters to OAuth Token Request as query params
Actual Behavior
- I'm trying to build a custom OAuth2 Access Token request by adding some query params to my Token Request.
- I will later add the access token to my API call as a bearer token.
- I did override OAuth2ClientCredentialsGrantRequestEntityConverter to build my request but I'm not able to fetch the actual API request Parameters to add to the query params for access token URI.
Expected Behavior
- I didn't see any support to add these custom parameters
- I tried using ExchangeFilterFunctions with no luck.
Configuration
Version
org.springframework.security:spring-security-oauth2-client:5.3.2.RELEASE
Sample
This image shows the query params which need to be dynamically populated.

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting OAuth2ClientCredentialsGrantRequestEntityConverter and the Spring Security OAuth2 client token-request path. Trace how request parameters reach the token URI and review the existing tests around this flow. Done should mean dynamically supplied custom query parameters are supported and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, authentication, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100