Announcement Announcement Module
No announcement yet.
Unique id on user table in stead of userid Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unique id on user table in stead of userid


    I have an application where I have many clients. I changed the user table and added a column called client_id.

    How can I get Acegi to look for the combination of userid and client_id in stead of only userid when authenticating?

    My problem is that the userid is unique in the whole application today and I would like to have the combination to be unique in stead.


    Last edited by tborum; Jan 4th, 2006, 08:12 AM.

  • #2
    First question is why do you want that? This way users can have the same userid? Do users have to logon with userid and clientid than? As for the answer, what kind of provider are you using? Are you using the JdbcDaoImpl?

    In short, please provide more details

    greetz Jettro


    • #3
      I have done this plenty of times in ASP style deployments.

      A bit of an intro is at

      Basically you need to select an identifier, then in your UserDetailsService you need to tokenize the Authentication.getPrincipal() so you get the two components out. See org.springframework.util.StringUtils for helpful methods.