2

I had an session management api, to logout certain users and so on backed by SessionRegistry, but now I have added Spring Social functionality and integrate it with current users. Unfortunately, using filter chain with SocialAuthenticationFilter do not integrate with Session Registry and I don't have information about sessions used by logged by OAuth users. Does anyone have an idea how to fix this or know better mechanism for logged users than SessionRegistry?

Mati
  • 2,476
  • 2
  • 17
  • 24
  • How do you solve your problem? – Matteo Codogno Apr 12 '17 at 20:01
  • @PapaSmurf To be honest I didn't. Since I had asked this question, there were a lot of other problems and also I changed later my job and I haven't later an opportunity to use spring social again ;) – Mati Apr 19 '17 at 20:40

1 Answers1

0

I had the same problem and I solved it by adding the SocialUserDetails to the SessionRegistry.

So in my SocialUserDetailsService when I build (loadUserByUserId) the SocialUserDetails I do that:

this.sessionRegistry.registerNewSession(UUID.randomUUID().toString(), frontendUser);
Matteo Codogno
  • 1,569
  • 6
  • 21
  • 36