CredentialsProvider () { CredentialsProvider provider = new BasicCredentialsProvider(); // Basic authentication if (isUseHttpAuthentication()) { provider.setCredentials(BASIC_AUTH_SCOPE, new UsernamePasswordCredentials(getUsername(), getPassword())); } // Proxy authentication if (isUseProxy()) { IdeHttpClientHelpers.ApacheHttpClient4.setProxyCredentialsForUrlIfEnabled(provider, getUrl()); } return provider; }