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

  • LDapUserDetailsImpl always returned

    Hi :

    I have written a custom UserDetailsContextMapper as outlined in
    http://static.springsource.org/sprin...ence/ldap.html.

    I override the method by extending org.springframework.security.ldap.userdetails.Ldap 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 org.springframework.security.ldap.userdetails.Ldap 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?.

    Thanks,
    BK

  • #2
    Hi,

    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

    Comment

    Working...
    X