Skip to content

Conversation

vpavic
Copy link
Contributor

@vpavic vpavic commented Sep 28, 2017

This PR adds support for auto-configuring Spring Session's DefaultCookieSerializer using ServerProperties.

The auto-configuration of DefaultCookieSerializer will back-off is users provide their own CookieSerializer or HttpSessionStrategy bean.

This resolves #10371.

@wilkinsona
Copy link
Member

or HttpSessionStrategy bean.

Is there a possibility that a user will want to use the auto-configured DefaultCookieSerializer to create a custom CookieHttpSessionStrategy?

@vpavic
Copy link
Contributor Author

vpavic commented Oct 19, 2017

Thanks for the feedback @wilkinsona.

Is there a possibility that a user will want to use the auto-configured DefaultCookieSerializer to create a custom CookieHttpSessionStrategy?

Yes, that indeed is a possibility. We can only discard that option if user configured HttpSessionStrategy is an instance of HeaderHttpSessionStrategy.

@wilkinsona
Copy link
Member

Thanks, @vpavic. Sounds like an update to the conditions may be in order. However, I think the preferred solution may be to fix #10699 although I'm not yet sure how to do so without adding something like ServletContextConfigurer that's subtly different to ServletContextInitializer.

@vpavic
Copy link
Contributor Author

vpavic commented Oct 20, 2017

I agree that fixing #10699 would be the preferred solution.

Nevertheless, I'll update the discussed conditions to have this PR available as a backup plan.

@vpavic
Copy link
Contributor Author

vpavic commented Oct 25, 2017

I'll update the discussed conditions to have this PR available as a backup plan.

Done.

@wilkinsona wilkinsona added priority: normal status: on-hold We can't start working on this issue yet type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 27, 2017
This commit adds support for auto-configuring Spring Session's `DefaultCookieSerializer` using `ServerProperties`.
@vpavic
Copy link
Contributor Author

vpavic commented Jan 19, 2018

With #10699 resolved, this PR isn't needed any more.

I've tested the latest 2.0.0.BUILD-SNAPSHOT and auto-configuring Spring Session's DefaultCookieSerializer using ServerProperties now works as expected.

@vpavic vpavic closed this Jan 19, 2018
@vpavic vpavic deleted the gh-10371 branch January 19, 2018 11:32
@wilkinsona
Copy link
Member

Thanks for testing the snapshot, @vpavic. Much appreciated.

@philwebb philwebb added status: declined A suggestion or change that we don't feel we should currently apply and removed priority: normal status: on-hold We can't start working on this issue yet type: enhancement A general enhancement labels Jan 22, 2018
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.

Support configuring Spring Session's session cookie using ServerProperties
4 participants