spring-projects / spring-projects/spring-security

Expose OAuth2EndpointUtils getFormParameters() and getQueryParameters()

Open
#18,233 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: oauth2 type: enhancement
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Currently the methods in org.springframework.security.oauth2.server.authorization.web.authentication.OAuth2EndpointUtils are all package private, and your provided AuthenticationConverters make good use of them.

So when creating a custom AuthenticationConverter if I want to get the OAuth form/query parameters I cannot make use of your utility methods and I have to create my own. And as I know yours have been battle tested, this ends up being just a copy and paste of your methods.

Is there a reason they were made package private originally? Because by making them public it would obviously save code duplication and more importantly, save us having to check for patches in that class when you release new versions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in org.springframework.security.oauth2.server.authorization.web.authentication.OAuth2EndpointUtils and inspect getFormParameters() and getQueryParameters(), along with the provided AuthenticationConverters that use them. Make the utilities available to custom AuthenticationConverter implementations, and confirm they can reuse the methods without copying them.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authentication
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.