Results 1 to 4 of 4

Thread: user cache problem

  1. #1
    Join Date
    Feb 2012
    Posts
    3

    Default user cache problem

    hi,
    we are using spring security for our project,for user authentication,we have multiple domains in our project,so for each and every domain he need to be authenthicated.so when the user is authenticated once using the project url,spring security is storing the url and user in the cache,i want the user to be authenticated again when he is comming from different domain,but when he is comming for next time he is forwarded to welcome page and the user is displayed from the cache.

    eg: http://localhost:8080/ProjectName?domain=1

    when i send the request as above for the first time the user will be authenticated,and in the next tab if i open another domain

    eg: http://localhost:8080/ProjectName?domain=2

    now the user is brought from cache,instead i want to treat it as a new request,so how could i resolve this?
    Please help me.

    Thanks and Regards,
    Sandeep.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Opening a new tab is copying all state for that server also. Session/cookies etc. are stored per server/url as you are still connected to localhost the data is copied and still available. Open an new clean browser (don't press CTRL+N in your current browser but really start a new one).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Feb 2012
    Posts
    3

    Default

    Dear Marten,
    Thanks for your reply,as you have told it is working well when we take different browser,but how i need to configure spring security to make it work in two different tabs in the same browser.

    Thanks and Regards,
    Sandeep.

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    As this is the nature of the browser you cannot unless you rewrite/reconfigure part of Spring Security (store the userinformation somewhere else then the session).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Posting Permissions

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