Package org.sonatype.security.ldap.realms.tools

Examples of org.sonatype.security.ldap.realms.tools.LdapURL


    CConnectionInfo connInfo = ldapServer.getConnectionInfo();

    String url;
    try {
      if (useBackupUrl) {
        url = new LdapURL(connInfo.getBackupMirrorProtocol(), connInfo.getBackupMirrorHost(), connInfo
            .getBackupMirrorPort(), connInfo.getSearchBase()).toString();
      }
      else {
        url = new LdapURL(connInfo.getProtocol(), connInfo.getHost(), connInfo.getPort(), connInfo
            .getSearchBase()).toString();
      }
    }
    catch (MalformedURLException e) {
      // log an error, because the user could still log in and fix the config.
View Full Code Here


    listEntry.setId(ldapServer.getId());
    listEntry.setName(ldapServer.getName());
    listEntry.setUrl(this.createChildReference(request, ldapServer.getId()).toString());

    try {
      listEntry.setLdapUrl(new LdapURL(ldapServer.getConnectionInfo().getProtocol(), ldapServer
          .getConnectionInfo().getHost(), ldapServer.getConnectionInfo().getPort(), ldapServer
          .getConnectionInfo().getSearchBase()).toString());
    }
    catch (MalformedURLException e) {
      this.getLogger().warn("Ldap Server has invalid URL", e);
View Full Code Here

    DefaultLdapContextFactory ldapContextFactory = new DefaultLdapContextFactory();
    ldapContextFactory.setAuthentication(connectionDto.getAuthScheme());
    ldapContextFactory.setSearchBase(connectionDto.getSearchBase());
    ldapContextFactory.setSystemPassword(connectionDto.getSystemPassword());
    ldapContextFactory.setSystemUsername(connectionDto.getSystemUsername());
    ldapContextFactory.setUrl(new LdapURL(connectionDto.getProtocol(), connectionDto.getHost(), connectionDto
        .getPort(), connectionDto.getSearchBase()).toString());
    ldapContextFactory.setAuthentication(connectionDto.getAuthScheme());

    final TrustStoreKey key = ldapTrustStoreKey(ldapServerId == null ? "<unknown>" : ldapServerId);
    if ("ldaps".equals(connectionDto.getProtocol())) {
View Full Code Here

  private URI getLdapServerUri(final LdapServerConfigurationDTO ldapServer)
      throws Exception
  {
    // which is an LDAPS server
    final URI uri = new URI(new LdapURL(
        ldapServer.getConnectionInfo().getProtocol(),
        ldapServer.getConnectionInfo().getHost(),
        ldapServer.getConnectionInfo().getPort(),
        ldapServer.getConnectionInfo().getSearchBase()).toString()
    );
View Full Code Here

TOP

Related Classes of org.sonatype.security.ldap.realms.tools.LdapURL

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.