public void authenticate(HttpClientBuilder pBuilder, String pUser, String pPassword) {
        // Preparing the builder for the credentials
        CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
        credentialsProvider.setCredentials(
                new AuthScope(AuthScope.ANY),
                new UsernamePasswordCredentials(pUser, pPassword));
        pBuilder.setDefaultCredentialsProvider(credentialsProvider);
        if (preemptive) {
            pBuilder.addInterceptorFirst(new PreemptiveAuthInterceptor(new BasicScheme()));
        }
    }
public void authenticate ( HttpClientBuilder pBuilder , String pUser , String pPassword ) { CredentialsProvider credentialsProvider = new BasicCredentialsProvider ( ) ; credentialsProvider . setCredentials ( new AuthScope ( AuthScope . ANY ) , new UsernamePasswordCredentials ( pUser , pPassword ) ) ; pBuilder . setDefaultCredentialsProvider ( credentialsProvider ) ; if ( preemptive ) { pBuilder . addInterceptorFirst ( new PreemptiveAuthInterceptor ( new BasicScheme ( ) ) ) ; } }
{@inheritDoc}