I'm working on a web application that has to use different domains for access over http and https. Now I'm facing the following problem: While the user is accessing the http-domain, some information is stored inside the session. When the user makes the transition to https the information which session the user belongs to is lost (because the session id is stored in the cookie that is associated with the http-domain).
How can I reattach the correct session to the user after he has switched domains?
Is it possible to execute some java-code right before the redirect that is caused by requires-channel="https
" is sent?
Edit: I was thinking there might be something specific in Spring Security that could be used, but so far I wasn't able to find anything in the documentation.
Edit 2: Just found out that what I probably need to do is to replace the ChannelProcessingFilter with a custom implementation. But I don't know what I have to do to make spring security to accept my new class instead of the default ChannelProcessingFilter. Note: I'm using Spring 3.0.