This repository was archived by the owner on Oct 12, 2021. It is now read-only.
Inject Multimap with POST params through an HttpServletRequestWrapper#33
Open
berezovskyi wants to merge 4 commits intomasterfrom
Open
Inject Multimap with POST params through an HttpServletRequestWrapper#33berezovskyi wants to merge 4 commits intomasterfrom
berezovskyi wants to merge 4 commits intomasterfrom
Conversation
Contributor
Author
|
@jadelkhoury this PR will be a bit hard to migrate to https://github.com/eclipse/lyo Should we merge this one? did you have a chance to test it? I think I wrote the code in response to OAuth failing when POST requests are used. I don't recall the exact problem. Did you ever hit something similar? |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depending on the configuration of the JAX-RS application, especially under Jersey, POST parameters may not be readable from the
HttpServletRequestand shall be accessed through JAX-RS facilities instead. See https://stackoverflow.com/questions/22376810/unable-to-retrieve-post-data-using-context-httpservletrequest-when-passed-to-o for more details.While I defined a new interface
IJaxTokenStrategythat does not depend on theHttpServletRequest, the key methodnet.oauth.server.HttpRequestMessage#getParametersdoes and is outside of our control. Therefore,OAuthRequest.OAuthServletRequestWrapperclass has been defined to wrap the original request while substituting the parameter map.Given that
OAuthRequestalready provides a reference to theHttpServletRequest, I decided not to remove the newly created interface.