Gustavo,
    Example of configuring LdapPasswordAuthenticationDao (the older code) would be:

    LdapPasswordAuthenticationDao dao = new LdapPasswordAuthenticationDao();
    dao.setURL("ldap://localhost:389/ou=system");
    dao.setUserContext("uid={0},ou=users,ou=system");
    dao.setDefaultRole(DEFAULT_ROLE);

    For more information the Javadoc LdapPasswordAuthenticationDao contains some decent examples.

    I am currently working on LdapPassword2AuthenticationDao; however it is NOT yet ready for use - it's is missing a couple of features needed to make it work properly.  For the curious example code (not freak out, when setup using Spring it will be relatively short) would be:

    UserSearchBean searchBean = new UserSearchBean();
    searchBean.setSubContext("ou=Users");
    searchBean.setSearchSubtree(false);
    searchBean.setUsernameFilter("uid={0}");
    searchBean.afterPropertiesSet();
    
    LdapSupport ldapSupport = new LdapSupport();
    ldapSupport.setRootContext("dc=mycompany,dc=com");
    ldapSupport.setURL("ldap://ldap.mycompnay.com:389/");
    
    LdapPassword2AuthenticationDao dao = new LdapPassword2AuthenticationDao();
    dao.setUserSearchBean( searchBean );
    dao.setLdapSupport( ldapSupport );
    dao.setDefaultRole("user");

Good luck.


Gustavo Faerman wrote:
Robert and Joseph,

Im looking the LdapPasswordAuthenticacionDao (R2).

Any chances you just share here your spring beans xml files for basic ldapSupport and UserSearchBean classes?. Just need to setup a quick test here.
Or any code where you just use this classes. Does not need to be productioni quality code. Just to move forward.

Thanks in advance,
Gustavo.



-- 
    Robert r. Sanders
    Chief Technologist
    iPOV
    (334) 821-5412
    www.ipov.net


Reply via email to