Announcement Announcement Module
No announcement yet.
LDapUserDetailsImpl always returned Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • LDapUserDetailsImpl always returned

    Hi :

    I have written a custom UserDetailsContextMapper as outlined in

    I override the method by extending UserDetailsMapper
    like so:

    public class MyCustomMapper extends LdapUserDetailsMapper{
    UserDetails mapUserFromContext(DirContextOperations ctx, String username,
    Collection<GrantedAuthority> authorities){
    return new MyUserDetails(.....);

    to add return an instance of MyUserDetails which implements UserDetails.
    However, at runtime after authentication, I still always gets back an instance
    of UserDetailsImpl.

    This can't be right.
    In fact, I was running this mapper via Spring Grails LDAP plugin(1.0.3) with Spring Release 3.0.3.

    Q: Is the UserDetailsMapper the only piece that decide what implementation of UserDetails are being returned and set in the Authentication object after authentication of an LDAP user?.


  • #2

    This is not a reply, but somewhat a similar concern.

    I have done a setting of application using spring-security.xml which uses CAS with LDAP.
    Here I want to get user's detail completely I.e. I require inetOrgPerson object, but every time I am getting LDapUserDetailsImpl. Can someone please guide me how can I get inetOrgPerson object by changing in springsecurity.xml