message = "\n";
message += "Authentication required.\n";
message += "realm: " + scheme.getRealm() + "\n";
message += " uri: " + uri + "\n";
UsernamePassword up = getResourceManager().getAuthenticationHandler().authenticate(message, uri,
username, visitedURIs.contains(key));
visitedURIs.add(key);
return new UsernamePasswordCredentials(up.getUsername(), up.getPassword());
}
});
}