Package org.sonatype.security.ldap.realms.connector

Examples of org.sonatype.security.ldap.realms.connector.DefaultLdapConnector


                                            LdapGroupDAO ldapGroupDAO) throws LdapDAOException
  {
    LdapContextFactory contextFactory = getLdapContextFactory(ldapServer, false);
    LdapAuthConfiguration authConfig = getLdapAuthConfiguration(ldapServer);

    new DefaultLdapConnector("test", ldapUserDAO, ldapGroupDAO, contextFactory, authConfig);

  }
View Full Code Here


             NoSuchLdapUserException
  {
    try {
      // first build the connector
      LdapConnector testLdapConnector =
          new DefaultLdapConnector(ldapServer.getId(), this.ldapUserManager, this.ldapGroupManager,
              this.getLdapContextFactory(ldapServer, false),
              this.getLdapAuthConfiguration(ldapServer));

      LdapUser user = testLdapConnector.getUser(userId);
      this.authenticateUser(user, password, testLdapConnector, ldapServer);
      return user;

    }
    catch (LdapDAOException e) {
View Full Code Here

    if (this.ldapConnectors.isEmpty()) {

      for (CLdapServerConfiguration ldapServer : this.ldapConfigurationManager.listLdapServerConfigurations()) {
        // first get the connector for the server
        LdapConnector originalLdapConnector =
            new DefaultLdapConnector(ldapServer.getId(), this.ldapUserManager, this.ldapGroupManager,
                this.getLdapContextFactory(ldapServer, false),
                this.getLdapAuthConfiguration(ldapServer));

        LdapConnector backupLdapConnector = null;

        // if we have a backup mirror defined we need to include that
        if (StringUtils.isNotEmpty(ldapServer.getConnectionInfo().getBackupMirrorHost())
            && ldapServer.getConnectionInfo().getBackupMirrorPort() > 0
            && StringUtils.isNotEmpty(ldapServer.getConnectionInfo().getBackupMirrorProtocol())) {

          backupLdapConnector =
              new DefaultLdapConnector(ldapServer.getId(), this.ldapUserManager, this.ldapGroupManager,
                  this.getLdapContextFactory(ldapServer, true),
                  this.getLdapAuthConfiguration(ldapServer));
        }

        this.ldapConnectors.add(new FailoverLdapConnector(
View Full Code Here

TOP

Related Classes of org.sonatype.security.ldap.realms.connector.DefaultLdapConnector

Copyright © 2018 www.massapicom. 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.