Announcement Announcement Module
Collapse
No announcement yet.
How keep additional user data in session? Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How keep additional user data in session?

    Hi all,
    I'm using spring security 2.0.3 to control access to web application written in spring mvc.
    When user log-in currently only predefined set of values are saved in session like username. But I want to keep some additional data like his company,etc.
    To achieve this do we have to modify the spring security source? or else can we extend spring security without touching source of the project?

    Any help/suggestion would be greatly appreciated!
    Thanks in advance.
    regards,
    Dilan

  • #2
    fetch the data only when u needed, u must have a Dao configured right ? just refetch the data by dao.findUser(username) ^^

    Comment


    • #3
      Hello, you can check the tutorial from the link http://forum.springframework.org/sho...27&postcount=1
      It also contains a section that describes how to store additional info about the logged user by extending Spring Security.

      Comment


      • #4
        andre80, that would work but then I will have to send calls to backend to fetch data for each and every request . So it would be better if I can keep all frequently needed data in user session. Anyway I'm looking at the reference manual and source... I got something working.. as soon as I get it to standard level I will others know too.
        Thanks for the suggestion though.

        cheers,
        Dilan

        Comment


        • #5
          thanks andrei.tudose.
          That is a good tutorial... but little too much for the requirement I'm having.

          Comment

          Working...
          X