Skip to content

Commit

Permalink
add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Reed committed Apr 3, 2014
1 parent 4219a10 commit 3243d98
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -10,9 +10,12 @@
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CustomHttpClientConfigurer implements HttpClientConfigurer {
private static final KeyManager[] EMPTY_KEYMANAGER_ARRAY = new KeyManager[0];
private static final Logger LOG = LoggerFactory.getLogger(CustomHttpClientConfigurer.class);

private String m_username = "admin";
private String m_password = "admin";
Expand All @@ -27,6 +30,7 @@ public void configureHttpClient(final HttpClient client) {
final UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(getUsername(), getPassword());
client.getState().setCredentials(AuthScope.ANY, credentials);
client.getParams().setAuthenticationPreemptive(true);
LOG.debug("Configuring HTTP client with modified trust manager, username={}, password=xxxxxxxx", getUsername());
} catch (final Exception e) {
throw new CustomConfigurerException(e);
}
Expand Down

0 comments on commit 3243d98

Please sign in to comment.