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

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


      throws AuthenticationException, InvalidConfigurationException, LdapServerNotFoundException,
             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())) {
View Full Code Here

  protected List<LdapConnector> getLdapConnectors() {
    List<LdapConnector> connectors = new ArrayList<LdapConnector>();
    this.mainConnector = this.buildMainMockServer("backup");
    this.backupConnector = this.buildBackupMockServer("backup");
    LdapConnector fallBackConnector = new FailoverLdapConnector(mainConnector, backupConnector, 2);
    connectors.add(fallBackConnector);

    return connectors;
  }
View Full Code Here

TOP

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

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.