Results 1 to 3 of 3

Thread: Unique id on user table in stead of userid

  1. #1
    Join Date
    Jan 2005
    Posts
    1

    Default Combined id on user table in stead of userid

    Hi,

    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.

    Regards

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

  2. #2
    Join Date
    Aug 2004
    Location
    The Netherlands
    Posts
    160

    Default

    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
    Jettro Coenradie
    http://www.gridshore.nl

  3. #3
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

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

    A bit of an intro is at http://forum.springframework.org/showthread.php?t=9830

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Posting Permissions

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