Announcement Announcement Module
Collapse
No announcement yet.
Can't do ldap bind authentication with domain\firstname.lastname Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by satcal View Post
    Hi ,

    I tried to use the same code above, can you pl. let me know the imports for the classes. I am also facing the same issue for last 2 days.
    AdAuthenticator:

    import javax.naming.NamingEnumeration;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    import javax.naming.ldap.InitialLdapContext;

    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.springframework.ldap.CommunicationException;
    import org.springframework.ldap.core.DirContextAdapter;
    import org.springframework.ldap.core.DirContextOperations ;
    import org.springframework.ldap.support.LdapUtils;
    import org.springframework.security.authentication.BadCre dentialsException;
    import org.springframework.security.core.Authentication;
    import org.springframework.security.ldap.DefaultSpringSec urityContextSource;
    import org.springframework.security.ldap.authentication.L dapAuthenticator;

    AdUserContextMapper:

    import javax.naming.NamingEnumeration;
    import javax.naming.directory.Attribute;
    import javax.naming.directory.Attributes;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    import javax.naming.ldap.InitialLdapContext;

    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.springframework.ldap.core.DirContextAdapter;
    import org.springframework.ldap.core.DirContextOperations ;
    import org.springframework.security.core.GrantedAuthority ;
    import org.springframework.security.core.authority.Grante dAuthorityImpl;
    import org.springframework.security.core.userdetails.User Details;
    import org.springframework.security.ldap.LdapUtils;
    import org.springframework.security.ldap.userdetails.User DetailsContextMapper;
    import com.foo.security.Principal;

    Principal implements org.springframework.security.core.userdetails.User Details.

    Comment


    • #17
      Originally posted by rshan View Post
      AdAuthenticator:

      import javax.naming.NamingEnumeration;
      import javax.naming.directory.SearchControls;
      import javax.naming.directory.SearchResult;
      import javax.naming.ldap.InitialLdapContext;

      import org.apache.commons.logging.Log;
      import org.apache.commons.logging.LogFactory;
      import org.springframework.ldap.CommunicationException;
      import org.springframework.ldap.core.DirContextAdapter;
      import org.springframework.ldap.core.DirContextOperations ;
      import org.springframework.ldap.support.LdapUtils;
      import org.springframework.security.authentication.BadCre dentialsException;
      import org.springframework.security.core.Authentication;
      import org.springframework.security.ldap.DefaultSpringSec urityContextSource;
      import org.springframework.security.ldap.authentication.L dapAuthenticator;

      AdUserContextMapper:

      import javax.naming.NamingEnumeration;
      import javax.naming.directory.Attribute;
      import javax.naming.directory.Attributes;
      import javax.naming.directory.SearchControls;
      import javax.naming.directory.SearchResult;
      import javax.naming.ldap.InitialLdapContext;

      import org.apache.commons.logging.Log;
      import org.apache.commons.logging.LogFactory;
      import org.springframework.ldap.core.DirContextAdapter;
      import org.springframework.ldap.core.DirContextOperations ;
      import org.springframework.security.core.GrantedAuthority ;
      import org.springframework.security.core.authority.Grante dAuthorityImpl;
      import org.springframework.security.core.userdetails.User Details;
      import org.springframework.security.ldap.LdapUtils;
      import org.springframework.security.ldap.userdetails.User DetailsContextMapper;
      import com.foo.security.Principal;

      Principal implements org.springframework.security.core.userdetails.User Details.
      Hi, I am facing the same issue as above using Spring security 3.0.5 with Ldap AD. Is the issue resolved with above custom code? if so, what's the Principal code you are using ?
      Thanks.

      Comment

      Working...
      X