-
Notifications
You must be signed in to change notification settings - Fork 6.1k
CookieClearingLogoutHandler for different Paths #6078
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
Comments
@maxcoinage Thanks for the suggestion. I think the goal makes sense, but I would change the implementation a bit. Rather than setting usePath is not as flexible as we would like. The reason for that is that a request to /foo can set a cookie for the path /foo/bar. Another thing to consider is that there are other properties that impact how it is deleted. For example, it might be on a sub domain. Finally, each cookie may have a different path or a different domain setting. For these reasons, perhaps it is better to allow injecting a collection of How does that sound? If you would be willing to submit a PR that would be great! I'd be willing to help you through the process. |
Hi @rwinch - that suggestion makes much more sense, thanks for considering my request. I would be willing to add the code and test cases required and open a PR. This would be my first contribution to an open source repo, so would appreciate some guidance. Should I base from the |
@maxcoinage
That is great news! Thank you for volunteering your time to contribute to Spring Security!
That is great! No problem. If you need anything just ping me in the comments here or on the PR you create.
Please base it off of master. Any features that need backported the security team will take care of. Since this is considered a new feature and not a bug, it is very unlikely to be backported. Again, if you need any help please don't hesitate to reach out. If you care to here are the Contributor Guidelines. Please don't stress about getting it right the first time as we can work together to get to the final goal of merging the PR. Thanks again for volunteering to help out! |
Enabled the ability to pass in an array of Cookies to support clearing cookies on a different path other than the default context path Issue: spring-projectsgh-6078
Changed the implementation to use an anonymous function Issue: spring-projectsgh-6078
Enabled the ability to pass in an array of Cookies to support clearing cookies on a different path other than the default context path Issue: gh-6078
Changed the implementation to use an anonymous function Issue: gh-6078
Fixed via: #6116 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
I would like to be able to utilize the CookieClearingLogoutHandler to remove cookies without a path set. Example is we are using SSO to authenticate with internal OpenId connect server. Cookies are set without a path by the server after user successfully authenticates. Our application runs on a different path. When user logs out of our app, the cookie is still valid for and therefore if the URL is loaded in same session, when our app redirects to the OpenId connect server will validate the user is still active and redirect back to our app, meaning user does not have to log in
Actual Behavior
Cookies are cleared on the Context Path only.
Expected Behavior
Enable the capability to clear cookies with no path set
Configuration
n/a
Version
5.1.1.RELEASE
Sample
Could we overload the constructor to do something like this?
Let me know if there are any thoughts and if this functionality would make sense, I could put up a PR
The text was updated successfully, but these errors were encountered: