Package com.novell.ldap

Examples of com.novell.ldap.LDAPConnection.bind()


        try {

            // Bind as user
            try {
                ldapConnection.bind(
                        LDAPConnection.LDAP_V3,
                        user_dn,
                        credentials.getPassword().getBytes("UTF-8")
                );
            }
View Full Code Here


      // Se establece la conexion con el servidor LDAP
      connection.connect(config.getString(IP), new Integer(config.getString(PORT)));
     
      // Se autentica el usuario
      byte[] encryptPassword = password.getBytes(UTF8);
      connection.bind(LDAPConnection.LDAP_V3, config.getString(DOMAIN)+ DOUBLE_BAR + user, encryptPassword);
     
      return searchUser(user, encryptPassword);
        } catch (Exception e) {
          logger.error(Tools.getStackTrace(e));
            throw new RuntimeException(e);
View Full Code Here

    try {
      // Se establece la conexion con el servidor LDAP
      connection.connect(config.getString(IP), new Integer(config.getString(PORT)));
     
      // Se autentica el usuario
      connection.bind(LDAPConnection.LDAP_V3, config.getString(DOMAIN)+ DOUBLE_BAR + user, password);
     
      LDAPSearchResults ldapSearchResults = connection.search("CN=Users,DC=" + config.getString(DOMAIN)+ ",DC=local",
          LDAPConnection.SCOPE_SUB, "(&(objectCategory=person)(objectClass=user))", null, Boolean.FALSE);

      while (ldapSearchResults.hasMore()){
View Full Code Here

    try {
      // Se establece la conexion con el servidor LDAP
      connection.connect(config.getString(IP), new Integer(config.getString(PORT)));
     
      // Se autentica el usuario
      connection.bind(LDAPConnection.LDAP_V3, config.getString(DOMAIN)+ DOUBLE_BAR + user, password);
     
      LDAPSearchResults ldapSearchResults = connection.search("CN=Users,DC=" + config.getString(DOMAIN)+ ",DC=local", LDAPConnection.SCOPE_SUB, "(&(objectCategory=person)(objectClass=user))", null, Boolean.FALSE);

      while (ldapSearchResults.hasMore()){
        LDAPEntry ldapEntry = ldapSearchResults.next();
View Full Code Here

    try {
      // Se establece la conexion con el servidor LDAP
      connection.connect(config.getString(IP), new Integer(config.getString(PORT)));
     
      // Se autentica el usuario
      connection.bind(LDAPConnection.LDAP_V3, config.getString(DOMAIN)+ DOUBLE_BAR + user, password);
     
      LDAPSearchResults ldapSearchResults = connection.search("CN=Users,DC=" + config.getString(DOMAIN)+ ",DC=local", LDAPConnection.SCOPE_SUB, "(&(objectCategory=person)(objectClass=user))", null, Boolean.FALSE);

      while (ldapSearchResults.hasMore()){
        LDAPEntry ldapEntry = ldapSearchResults.next();
View Full Code Here

    }
    try {
      // connect to the server
      lc.connect(serverAddress, ldapPort);
      // authenticate to the server
      lc.bind(LDAPConnection.LDAP_V3, connectionDN, connectionPassword.getBytes());
    } catch (LDAPException e) {
      log.error("Error during AD bind", e);
      disconnect(lc);
      lc = null;
    }
View Full Code Here

          String currentServer = (String) servers.next();
          try {
            TCPTool.probeConnectionLDAP(currentServer, Integer.parseInt(getPort()), getConnectionTimeOut())// Avoid waiting for halfdead-servers
            lc.connect(currentServer, Integer.parseInt(getPort()));
            // authenticate to the server
            lc.bind(ldapVersion, getLoginDN(), getLoginPassword().getBytes("UTF8"), ldapBindConstraints);           
            // Add or modify the entry
            if (oldEntry != null && getModifyExistingUsers()) {
              LDAPModification[] mods = new LDAPModification[modSet.size()];
              mods = (LDAPModification[])modSet.toArray(mods);
              String oldDn = oldEntry.getDN();
View Full Code Here

      try {
        TCPTool.probeConnectionLDAP(currentServer, Integer.parseInt(getPort()), getConnectionTimeOut())// Avoid waiting for halfdead-servers
        // connect to the server
        lc.connect(currentServer, Integer.parseInt(getPort()));
        // authenticate to the server
        lc.bind(ldapVersion, getLoginDN(), getLoginPassword().getBytes("UTF8"), ldapBindConstraints);
        // Add or modify the entry
        if (oldEntry != null) {
          LDAPModification[] mods = new LDAPModification[modSet.size()];
          mods = (LDAPModification[])modSet.toArray(mods);
          lc.modify(dn, mods, ldapStoreConstraints);
View Full Code Here

      }
      try {
        TCPTool.probeConnectionLDAP(currentServer, Integer.parseInt(getPort()), getConnectionTimeOut())// Avoid waiting for halfdead-servers
        lc.connect(currentServer, Integer.parseInt(getPort()));
        // authenticate to the server
        lc.bind(ldapVersion, getLoginDN(), getLoginPassword().getBytes("UTF8"), ldapBindConstraints);           
        // Add or modify the entry
        if (oldEntry != null && modSet != null && getModifyExistingUsers()) {
          if (removecert) {
            LDAPModification[] mods = new LDAPModification[modSet.size()];
            mods = (LDAPModification[])modSet.toArray(mods);
View Full Code Here

      try {
        TCPTool.probeConnectionLDAP(currentServer, Integer.parseInt(getPort()), getConnectionTimeOut())// Avoid waiting for halfdead-servers
        // connect to the server
        lc.connect(currentServer, Integer.parseInt(getPort()));
        // authenticate to the server
        lc.bind(ldapVersion, getLoginDN(), getLoginPassword().getBytes("UTF8"), ldapBindConstraints);
        // try to read the base object
        String baseDN = getBaseDN();
        if (log.isDebugEnabled()) {
          log.debug("Trying to read top node '"+baseDN+"'");
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.