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

Fix userinfo retriaval with post call #2544

Merged

Conversation

bhagyasakalanka
Copy link
Contributor

Purpose

Currently, the userinfo endpoint fails to give response with POST calls if the contentType header is not present in the request. But in lower versions, we support this behavior. With this fix, we bring the expected behavior

Fix explain

  1. Bring back the behavior before Issue[1]/PR[1] which is to validate the content type at code level instead on using @consumer annotation.
  2. Remove the fix done in Issue[2]/PR[2] as POST body token resolving was already available in step 1 solution.
  3. Prevent allowing passing token in the body of a GET request.
  4. Bring removed unit tests in PR[1]. Improve the tests to work with newer versions.

We could bring the behavior before Issue[1]/PR[1] because the said issue in the Issue[1] is resolved in RequestCorrelationIdValve and the request body is passed to userinfo endpoint level.

Related Issues

Related PRs

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/10382151373

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10382151373
Status: failure

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/10382355715

chamathns
chamathns previously approved these changes Aug 14, 2024
@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10382355715
Status: failure

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/10387037657

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10387037657
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/10387037657

@bhagyasakalanka bhagyasakalanka merged commit 9bf0217 into wso2-extensions:master Aug 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants