Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Domain style logins (not NT domains!)

  1. #11
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I think your User objects needs to contain the domain:username style value. This value is used in all sorts of places so it needs to contain the fully qualified username to work. As for checking the authentication everytime, this will only happen if you configure it to do this. I'm pretty sure it doesn't do this by default. I'm not quite sure what the question about "returnUsername" is.

  2. #12
    Join Date
    Mar 2007
    Posts
    3

    Default Finally

    Hi there!

    Just wanted to tell you that I finally decided to go with the domain:username concatenation way. It works well. I just had to subclass three classes:

    org.acegisecurity.ui.webapp.AuthenticationProcessi ngFilter
    - to parse the domain, username and password and concatenate the domain and the real username in the "username" field -- attemptAuthentication(...), obtainUsername(...).

    org.acegisecurity.userdetails.jdbc.JdbcDaoImpl
    - to split the concatenated username and use the domain and real username for getting the user details from the DB -- loadUserByUsername(...)

    org.acegisecurity.userdetails.User
    - to add the domain and realUsername.

    Please note: DO NOT use ":" delimiter if you intend to use the Remember Me functionality, because the latter function won't work as it uses ":" as its delimiter and won't split the cookie correctly if ":" is found in *our* concatenated username.

    Thank you Karl Moore for your feedbacks. You were right, it is very important to keep the username concatenated in the User object, and add a new field ie realUsername to get the unconcatenated username.

    Have a nice development!
    - Kexkey

  3. #13
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Thanks for posting back, glad you got it all working! That was a good point about RememberMe I hadn't really thought about that.

Similar Threads

  1. Avoiding UI-centric Domain Classes
    By dhainlin in forum Web
    Replies: 5
    Last Post: Mar 27th, 2006, 01:16 PM
  2. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  3. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  4. EJB service layer non-OO / Anemic Domain Model
    By Aro in forum Architecture
    Replies: 0
    Last Post: Jan 15th, 2005, 07:10 AM
  5. Replies: 0
    Last Post: Jan 6th, 2005, 08:19 AM

Posting Permissions

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