0 Replies Latest reply on Oct 15, 2014 11:32 AM by msio

    Picketlink - validate Credentials with LDAP

    msio

      hi

      I read whole doc https://docs.jboss.org/picketlink/2/latest/reference/html-single

      but i didnt find how to setup validating credentials with ldap.

      my ldap configuration looks like

       

      IdentityConfigurationBuilder builder = new IdentityConfigurationBuilder();

       

        builder.named("ldap.config").stores().ldap()

        .baseDN("dc=example,dc=com")

        .bindDN("uid=admin,ou=system").bindCredential("secret")

        .url("ldap://localhost:10389").mapping(User.class).baseDN("ou=users,ou=system")

        .objectClasses("inetOrgPerson", "organizationalPerson")

        .attribute("firstName", CN).attribute("lastName", SN).attribute("loginName",UID,true).attribute("email", EMAIL);

       

      it works perfectly i can indeject IdentityManager a i get all users with the attributes but if i wanna validate credentials


      UsernamePasswordCredentials credentials=  new UsernamePasswordCredentials("max123", new Password("max123"));

      identityManager.validateCredentials(credentials);

       

      I get the exception

      No IdentityStore found for credential class [class org.picketlink.idm.credential.UsernamePasswordCredentials]

       

      I know i have to configure something to support password for LDAP but i dont know how

      thank you for help

      jozef