1

I would like to have a header based HttpSessionStrategy as listed below however Spring Social seems to want to store the social token on the session. When it is redirected back to the application no x-auth-header is specified so a new session is created and the token is lost.

Can we have still have the HeaderSessionStrategy with the CookieSessionStrategy as a fallback?

What is the best way to handle this?

@Bean
public HttpSessionStrategy httpSessionStrategy() {
  return new HeaderHttpSessionStrategy(); 
}
user1
  • 4,031
  • 8
  • 37
  • 66
wgorder
  • 98
  • 1
  • 7

1 Answers1

5

Here is what you want. SmartHttpSessionStrategy

kalman03
  • 1,800
  • 2
  • 11
  • 7
  • Yeah I was also looking at MultiHttpSessionStrategy and just having it do both cookies and headers. The link you gave will work in a either/or scenario if I can define exactly when I want to do which. Either way its a good find and gives me another option. – wgorder Oct 25 '15 at 01:57
  • Will this also work when adding WebSockets into the mix? – Marc Jun 04 '16 at 13:38