Examples of NtlmAuthenticationConfig


Examples of org.sonatype.nexus.component.source.api.http.NtlmAuthenticationConfig

{

  @Override
  public Map<String, Object> toMap(final AuthenticationConfig config) {
    checkNotNull(config, "config");
    NtlmAuthenticationConfig cfg = (NtlmAuthenticationConfig) config;
    Map<String, Object> configMap = Maps.newHashMapWithExpectedSize(4);
    configMap.put("username", cfg.getUsername());
    configMap.put("password", cfg.getPassword());
    configMap.put("ntlmHost", cfg.getNtlmHost());
    configMap.put("ntlmDomain", cfg.getNtlmDomain());
    return configMap;
  }
View Full Code Here

Examples of org.sonatype.nexus.component.source.api.http.NtlmAuthenticationConfig

  }

  @Override
  public AuthenticationConfig fromMap(final Map<String, Object> configMap) {
    checkNotNull(configMap, "config map");
    return new NtlmAuthenticationConfig()
        .withUsername((String) configMap.get("username"))
        .withPassword((String) configMap.get("password"))
        .withNtlmHost((String) configMap.get("ntlmHost"))
        .withNtlmDomain((String) configMap.get("ntlmDomain"));
  }
View Full Code Here

Examples of org.sonatype.nexus.component.source.api.http.NtlmAuthenticationConfig

                )
            )
            .withHttpsProxyConfig(new HttpProxyConfig()
                .withHostname("httpsHost")
                .withPort(4)
                .withAuthenticationConfig(new NtlmAuthenticationConfig()
                    .withUsername("foo2")
                    .withPassword("bar2")
                    .withNtlmHost("ntlmH")
                    .withNtlmDomain("ntlmD")
                )
View Full Code Here

Examples of org.sonatype.nexus.component.source.api.http.NtlmAuthenticationConfig

    assertThat(a2.getUsername(), is("foo1"));
    assertThat(a2.getPassword(), is("bar1"));

    assertThat(config.getProxyConfig().getHttpsProxyConfig().getHostname(), is("httpsHost"));
    assertThat(config.getProxyConfig().getHttpsProxyConfig().getPort(), is(4));
    NtlmAuthenticationConfig a3 = (NtlmAuthenticationConfig) config.getProxyConfig().getHttpsProxyConfig()
        .getAuthenticationConfig();
    assertThat(a3.getUsername(), is("foo2"));
    assertThat(a3.getPassword(), is("bar2"));
    assertThat(a3.getNtlmHost(), is("ntlmH"));
    assertThat(a3.getNtlmDomain(), is("ntlmD"));

    assertThat(config.getProxyConfig().getNonProxyHosts(), is(new String[]{"h1", "h2"}));
  }
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.