Package com.unboundid.ldap.sdk

Examples of com.unboundid.ldap.sdk.LDAPConnection.bind()


        }
      }

      if (StringUtils.isEmpty(bindUserName) && StringUtils.isEmpty(bindPassword)) {
        // anonymous bind
        conn.bind(new SimpleBindRequest());
      } else {
        // authenticated bind
        conn.bind(new SimpleBindRequest(bindUserName, bindPassword));
      }
View Full Code Here


      if (StringUtils.isEmpty(bindUserName) && StringUtils.isEmpty(bindPassword)) {
        // anonymous bind
        conn.bind(new SimpleBindRequest());
      } else {
        // authenticated bind
        conn.bind(new SimpleBindRequest(bindUserName, bindPassword));
      }

      return conn;

    } catch (URISyntaxException e) {
View Full Code Here

        String bindPattern = settings.getString(Keys.realm.ldap.bindpattern, "");
        if (!StringUtils.isEmpty(bindPattern)) {
          try {
            String bindUser = StringUtils.replace(bindPattern, "${username}", escapeLDAPSearchFilter(simpleUsername));
            ldapConnection.bind(bindUser, new String(password));

            alreadyAuthenticated = true;
          } catch (LDAPException e) {
            return null;
          }
View Full Code Here

        }
      }

      if (StringUtils.isEmpty(bindUserName) && StringUtils.isEmpty(bindPassword)) {
        // anonymous bind
        conn.bind(new SimpleBindRequest());
      } else {
        // authenticated bind
        conn.bind(new SimpleBindRequest(bindUserName, bindPassword));
      }
View Full Code Here

      if (StringUtils.isEmpty(bindUserName) && StringUtils.isEmpty(bindPassword)) {
        // anonymous bind
        conn.bind(new SimpleBindRequest());
      } else {
        // authenticated bind
        conn.bind(new SimpleBindRequest(bindUserName, bindPassword));
      }

      return conn;

    } catch (URISyntaxException e) {
View Full Code Here

        String bindPattern = settings.getString(Keys.realm.ldap.bindpattern, "");
        if (!StringUtils.isEmpty(bindPattern)) {
          try {
            String bindUser = StringUtils.replace(bindPattern, "${username}", escapeLDAPSearchFilter(simpleUsername));
            ldapConnection.bind(bindUser, new String(password));

            alreadyAuthenticated = true;
          } catch (LDAPException e) {
            return null;
          }
View Full Code Here

                    throw new MojoExecutionException(message, e);
                }
            }
        }
        try {
            connection.bind(authDn, passwd);
        } catch (final LDAPException e) {
            throw new MojoExecutionException("Could not bind to LDAP directory server as " + authDn, e);
        }
        return connection;
    }
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.