Results 1 to 3 of 3

Thread: SecurityContextHolder remains with old sessionId after login

  1. #1
    Join Date
    Mar 2010
    Posts
    28

    Default SecurityContextHolder remains with old sessionId after login

    Hello,

    I'm using Spring Security 3.0.7 in web application which runs on JBoss 6.

    The problem that I'm facing is that when I access SecurityContextHolder, after user was logged-in and session was revalidated, the SecurityContextHolder still holds an old session (before revalidation).

    String sessionId = ((WebAuthenticationDetails)SecurityContextHolder.g etContext().getAuthentication().getDetails()).getS essionId();

    So, I have sessions inconsistency between new revalidated session, which was sent to client browser and old session which for some reason was not updated in SecurityContextHolder.

    I would expect that SecurityContextHolder will hold the same session which is hold by user browser.

    Thanks,
    Pavel
    Last edited by pavel.orehov; Jan 5th, 2012 at 05:05 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    1,826

  3. #3
    Join Date
    Mar 2010
    Posts
    28

    Default

    So, is there any other way that I can retrieve current logged-in user sessionId in a static way like from SecurityContextHolder ?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •