-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Change getMethod() to return configured value in SimpleSavedRequest #8675
Comments
Good catch, @sentinalll. I think the intent of this class is to save the method indicated in the constructor that takes a Would you be interested in submitting a PR to update the |
Out of curiosity, @sentinalll, can you tell me the context in which you are using The reason I ask is that it's relatively uncommon to use |
Hi @jzheaux, sorry for the delay. Sure, I can work on a PR. With |
So, am I following correctly to assume that you only need to store the URL and you don't actually need the method? |
Yes, you are right. I am using
|
Thanks for the PR, @sentinalll, I will take a look. I'd like to continue to take this opportunity to learn more about your use case since I'm not sure that I've seen it before. By default, Spring Security uses I gather from your last comment that you are caching the request and redirecting to an authorization server, and then once the OAuth 2.0 flow is complete, you are redirecting back to the saved request.
When you are setting the location header, do you set it to Because you are using |
As I can see, |
Before: 1. SimpleSavedRequest#getMethod returned null 2. SimpleSavedRequest(SavedRequest request) constructor did not set the method field from request After: 1. SimpleSavedRequest#getMethod returns method property value 2. SimpleSavedRequest(SavedRequest request) constructor sets the method field from request Closes spring-projectsgh-8675
Before: 1. SimpleSavedRequest#getMethod returned null 2. SimpleSavedRequest(SavedRequest request) constructor did not set the method field from request After: 1. SimpleSavedRequest#getMethod returns method property value 2. SimpleSavedRequest(SavedRequest request) constructor sets the method field from request Closes gh-8675
Expected Behavior
getMethod() returns value configured for "method" property
Current Behavior
returns null
Context
It causes failures when the request is resolved on authentication
As a workaround SimpleSavedRequest can be extended with overridden getMethod method
The text was updated successfully, but these errors were encountered: