Examples of LdapConnectionInfoDTO


Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

    dto.setUserAndGroupConfig(userGroupConf);
    return dto;
  }

  protected LdapConnectionInfoDTO getDefaultConnectionInfo() {
    LdapConnectionInfoDTO connInfo = new LdapConnectionInfoDTO();

    connInfo.setAuthScheme("simple");
    connInfo.setCacheTimeout(30);
    connInfo.setConnectionRetryDelay(0);
    connInfo.setConnectionTimeout(10);
    connInfo.setHost("localhost");

    // using fixed port if ldap server is not to be started to be able to plug external server instance for debugging
    connInfo.setPort(isStartServer() ? this.getLdapServer().getPort() : 10389);

    connInfo.setProtocol("ldap");
    // connInfo.setRealm( "" );
    connInfo.setSearchBase("o=sonatype");
    connInfo.setSystemPassword(encodeBase64("secret"));
    connInfo.setSystemUsername(encodeBase64("uid=admin,ou=system"));
    return connInfo;
  }
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

    ldapServerLoginTestRequest.getData().getConfiguration().setId(null); // not set
    ldapServerLoginTestRequest.getData().getConfiguration().setName("testPost");
    ldapServerLoginTestRequest.getData().getConfiguration().setUrl(null); // set on the return, not the request

    LdapConnectionInfoDTO connInfo = new LdapConnectionInfoDTO();
    ldapServerLoginTestRequest.getData().getConfiguration().setConnectionInfo(connInfo);

    connInfo.setAuthScheme("simple");
    connInfo.setCacheTimeout(30);
    connInfo.setConnectionRetryDelay(0);
    connInfo.setConnectionTimeout(10);
    connInfo.setHost("localhost");
    connInfo.setPort(this.getLdapServer().getPort());
    connInfo.setProtocol("ldap");
    // connInfo.setRealm( "" );
    connInfo.setSearchBase("o=sonatype");
    connInfo.setSystemPassword(encodeBase64("secret"));
    connInfo.setSystemUsername(encodeBase64("uid=admin,ou=system"));

    LdapUserAndGroupAuthConfigurationDTO userGroupConf = new LdapUserAndGroupAuthConfigurationDTO();
    ldapServerLoginTestRequest.getData().getConfiguration().setUserAndGroupConfig(userGroupConf);

    userGroupConf.setUserMemberOfAttribute("businesscategory");
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

    ldapServerLoginTestRequest.getData().getConfiguration().setId(null); // not set
    ldapServerLoginTestRequest.getData().getConfiguration().setName("testPost");
    ldapServerLoginTestRequest.getData().getConfiguration().setUrl(null); // set on the return, not the request

    LdapConnectionInfoDTO connInfo = new LdapConnectionInfoDTO();
    ldapServerLoginTestRequest.getData().getConfiguration().setConnectionInfo(connInfo);

    connInfo.setAuthScheme("simple");
    connInfo.setCacheTimeout(30);
    connInfo.setConnectionRetryDelay(0);
    connInfo.setConnectionTimeout(10);
    connInfo.setHost("INVALIDSERVERNAME");
    connInfo.setPort(this.getLdapServer().getPort());
    connInfo.setProtocol("ldap");
    // connInfo.setRealm( "" );
    connInfo.setSearchBase("o=sonatype");
    connInfo.setSystemPassword(encodeBase64("secret"));
    connInfo.setSystemUsername(encodeBase64("uid=admin,ou=system"));

    LdapUserAndGroupAuthConfigurationDTO userGroupConf = new LdapUserAndGroupAuthConfigurationDTO();
    ldapServerLoginTestRequest.getData().getConfiguration().setUserAndGroupConfig(userGroupConf);

    userGroupConf.setUserMemberOfAttribute("businesscategory");
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

    ldapServerLoginTestRequest.getData().getConfiguration().setId(null); // not set
    ldapServerLoginTestRequest.getData().getConfiguration().setName("test");
    ldapServerLoginTestRequest.getData().getConfiguration().setUrl(null); // set on the return, not the request

    LdapConnectionInfoDTO connInfo = getConnectionInfo();
    LdapUserAndGroupAuthConfigurationDTO userGroupConf = getUserGroupConf();

    ldapServerLoginTestRequest.getData().getConfiguration().setConnectionInfo(connInfo);
    ldapServerLoginTestRequest.getData().getConfiguration().setUserAndGroupConfig(userGroupConf);
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

    userGroupConf.setUserSubtree(true);
    return userGroupConf;
  }

  private LdapConnectionInfoDTO getConnectionInfo() {
    LdapConnectionInfoDTO connInfo = new LdapConnectionInfoDTO();

    connInfo.setAuthScheme("simple");
    connInfo.setCacheTimeout(30);
    connInfo.setConnectionRetryDelay(0);
    connInfo.setConnectionTimeout(10);
    connInfo.setHost("localhost");
    connInfo.setPort(this.getLdapServer().getPort());
    connInfo.setProtocol("ldap");
    // connInfo.setRealm( "" );
    connInfo.setSearchBase("o=more&more");
    connInfo.setSystemPassword(encodeBase64("secret"));
    connInfo.setSystemUsername(encodeBase64("uid=admin,ou=system"));
    return connInfo;
  }
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

  protected Request buildRequest() {
    return this.buildRequest(null);
  }

  protected LdapConnectionInfoDTO buildConnectionInfoDTO() throws UnsupportedEncodingException {
    LdapConnectionInfoDTO connInfo = new LdapConnectionInfoDTO();

    connInfo.setAuthScheme("ldap");
    connInfo.setBackupMirrorHost("backupHost");
    connInfo.setBackupMirrorPort(11111);
    connInfo.setBackupMirrorProtocol("ldap");
    connInfo.setCacheTimeout(30);
    connInfo.setConnectionRetryDelay(300);
    connInfo.setConnectionTimeout(15);
    connInfo.setHost("localhost");
    connInfo.setPort(386);
    connInfo.setProtocol("ldap");
    connInfo.setRealm("");
    connInfo.setSearchBase("ou=searchbase");
    connInfo.setSystemPassword(encodeBase64("systemPassword"));
    connInfo.setSystemUsername(encodeBase64("systemUsername"));

    return connInfo;
  }
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

  {
    PlexusResource pr = this.lookup(PlexusResource.class, "LdapServerListPlexusResource");

    LdapServerRequest ldapServerRequest = new LdapServerRequest();
    LdapServerConfigurationDTO dto = new LdapServerConfigurationDTO();
    LdapConnectionInfoDTO connectionDto = new LdapConnectionInfoDTO();
    LdapUserAndGroupAuthConfigurationDTO userGroupDto = new LdapUserAndGroupAuthConfigurationDTO();

    ldapServerRequest.setData(dto);
    dto.setConnectionInfo(connectionDto);
    dto.setUserAndGroupConfig(userGroupDto);

    dto.setName("test");
    connectionDto.setHost("test");
    connectionDto.setPort(389);
    connectionDto.setSearchBase("test");
    connectionDto.setAuthScheme("none");
    connectionDto.setProtocol("ldap");
    connectionDto.setBackupMirrorProtocol("ldap");
    connectionDto.setBackupMirrorHost("asdf");
    connectionDto.setBackupMirrorPort(389);
    connectionDto.setConnectionTimeout(33);
    connectionDto.setConnectionRetryDelay(44);
    connectionDto.setCacheTimeout(55);
    userGroupDto.setEmailAddressAttribute("qasdf");
    userGroupDto.setLdapGroupsAsRoles(true);
    userGroupDto.setUserPasswordAttribute("asdf");
    userGroupDto.setUserIdAttribute("asdf");
    userGroupDto.setUserObjectClass("asdf");
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

    dto.setName(ldapServer.getName());

    if (ldapServer.getConnectionInfo() != null) {
      CConnectionInfo connInfo = ldapServer.getConnectionInfo();

      LdapConnectionInfoDTO infoDto = new LdapConnectionInfoDTO();
      infoDto.setAuthScheme(connInfo.getAuthScheme());
      infoDto.setBackupMirrorHost(connInfo.getBackupMirrorHost());
      infoDto.setBackupMirrorPort(connInfo.getBackupMirrorPort());
      infoDto.setBackupMirrorProtocol(connInfo.getBackupMirrorProtocol());
      infoDto.setCacheTimeout(connInfo.getCacheTimeout());
      infoDto.setConnectionRetryDelay(connInfo.getConnectionRetryDelay());
      infoDto.setConnectionTimeout(connInfo.getConnectionTimeout());
      infoDto.setHost(connInfo.getHost());
      infoDto.setPort(connInfo.getPort());
      infoDto.setProtocol(connInfo.getProtocol());
      infoDto.setRealm(connInfo.getRealm());
      infoDto.setSearchBase(connInfo.getSearchBase());
      infoDto.setSystemUsername(connInfo.getSystemUsername());
      if (connInfo.getSystemPassword() != null) {
        infoDto.setSystemPassword(FAKE_PASSWORD);
      }
      dto.setConnectionInfo(encode(infoDto));
    }

    if (ldapServer.getUserAndGroupConfig() != null) {
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

    dto.setId(null); // not set
    dto.setName("testPost");
    dto.setUrl(null); // set on the return, not the request

    LdapConnectionInfoDTO connInfo = new LdapConnectionInfoDTO();
    dto.setConnectionInfo(connInfo);

    connInfo.setAuthScheme("ldap");
    connInfo.setBackupMirrorHost("backupHost");
    connInfo.setBackupMirrorPort(11111);
    connInfo.setBackupMirrorProtocol("ldap");
    connInfo.setCacheTimeout(30);
    connInfo.setConnectionRetryDelay(300);
    connInfo.setConnectionTimeout(15);
    connInfo.setHost("localhost");
    connInfo.setPort(386);
    connInfo.setProtocol("ldap");
    connInfo.setRealm("");
    connInfo.setSearchBase("ou=searchbase");
    connInfo.setSystemPassword(encodeBase64("systemPassword"));
    connInfo.setSystemUsername(encodeBase64("systemUsername"));

    LdapUserAndGroupAuthConfigurationDTO userGroupConf = new LdapUserAndGroupAuthConfigurationDTO();
    dto.setUserAndGroupConfig(userGroupConf);

    userGroupConf.setUserMemberOfAttribute("userMemberOfAttribute");
View Full Code Here

Examples of com.sonatype.security.ldap.api.dto.LdapConnectionInfoDTO

    dto.setId(null); // not set
    dto.setName("testPost");
    dto.setUrl(null); // set on the return, not the request

    LdapConnectionInfoDTO connInfo = new LdapConnectionInfoDTO();
    dto.setConnectionInfo(connInfo);

    connInfo.setAuthScheme("ldap");
    connInfo.setBackupMirrorHost("backupHost");
    connInfo.setBackupMirrorPort(11111);
    connInfo.setBackupMirrorProtocol("ldap");
    connInfo.setCacheTimeout(30);
    connInfo.setConnectionRetryDelay(300);
    connInfo.setConnectionTimeout(15);
    connInfo.setHost(null); // missing host
    connInfo.setPort(386);
    connInfo.setProtocol("ldap");
    connInfo.setRealm("");
    connInfo.setSearchBase("ou=searchbase");
    connInfo.setSystemPassword(encodeBase64("systemPassword"));
    connInfo.setSystemUsername(encodeBase64("systemUsername"));

    LdapUserAndGroupAuthConfigurationDTO userGroupConf = new LdapUserAndGroupAuthConfigurationDTO();
    dto.setUserAndGroupConfig(userGroupConf);

    userGroupConf.setUserMemberOfAttribute("userMemberOfAttribute");
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.