Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OAuth2EndpointUtils.java #1728

Closed
wants to merge 1 commit into from

Conversation

MicahZheng
Copy link

getQueryParameters only get query parameter ,
getFormParameters only get form parameter

getQueryParameters only get query parameter ,
getFormParameters only get form parameter
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 25, 2024
@jgrandja
Copy link
Collaborator

@MicahZheng I don't understand why this change is needed?

Did you find an issue? If so, please provide a minimal sample or test that reproduces the issue so I can look into it further.

@jgrandja jgrandja self-assigned this Sep 26, 2024
@jgrandja jgrandja added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 26, 2024
@MicahZheng
Copy link
Author

When the query parameters and form parameters are the same, the method getFormParameters will not get any parameters. And my partner gave me such parameters when requesting my interface, and the query parameters and form parameters are exactly the same. It does provide enough parameters. Maybe he should only put the form parameters, but I found that the method getQueryParameters and the method getFormParameters are not Just get the corresponding content like his name

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Sep 26, 2024
@jgrandja
Copy link
Collaborator

@MicahZheng Sorry but I still don't understand your use case. As mentioned in the previous comment:

If so, please provide a minimal sample or test that reproduces the issue so I can look into it further.

This will help me understand your use case. As of now, I don't see any issues and this PR will get closed if you're unable to provide a reproducer.

@jgrandja jgrandja added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Sep 30, 2024
@MicahZheng
Copy link
Author

POST https://example.com/oauth2/token?grant_type=authorization_code&code=the_authorization_code&redirect_uri=https%3A%2F%2Fyourapp.com%2Fcallback&client_id=client_id&client_secret=client_secret&scope=read+write HTTP/1.1
Host: example.com
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&code=the_authorization_code&redirect_uri=https%3A%2F%2Fyourapp.com%2Fcallback&client_id=client_id&client_secret=client_secret&scope=read+write

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 3, 2024
@jgrandja jgrandja added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Oct 3, 2024
@jgrandja
Copy link
Collaborator

jgrandja commented Oct 4, 2024

@MicahZheng I now understand your scenario.

Please review the spec for Token Endpoint:

The client MUST use the HTTP POST method when making access token requests.

The client should not be sending query parameters AND body parameters as this is an invalid request and should be fixed at the client.

I'm going to close this PR as getFormParameters() and getQueryParameters() is implemented as expected.

@jgrandja jgrandja closed this Oct 4, 2024
@jgrandja jgrandja added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 4, 2024
@MicahZheng MicahZheng deleted the patch-1 branch October 5, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants