final String[] credentials = userinfo.split(":"); if (credentials.length == 2) { clientWrapper.addBasicCredentials(credentials[0], credentials[1]) .usePreemptiveAuth(); } else {
m_httpClientWrapper.addBasicCredentials(m_userName, m_password);
@Override public Requisition getRequisitionFor(HttpRequisitionRequest request) { try (HttpClientWrapper client = HttpClientWrapper.create()) { final URI uri = new URI(request.getUrl()); HttpGet get = new HttpGet(uri); if (Boolean.FALSE.equals(request.getStrictSsl())) { client.trustSelfSigned(uri.getScheme()); } if(Boolean.TRUE.equals(request.getUseSystemProxy())){ client.useSystemProxySettings(); } if (request.getUsername() != null) { client.addBasicCredentials(request.getPassword(), request.getPassword()); } try (CloseableHttpResponse response = client.execute(get)) { String responseString = new BasicResponseHandler().handleResponse(response); return JaxbUtils.unmarshal(Requisition.class, responseString); } } catch (Exception e) { throw new RuntimeException(e); } }
m_clientWrapper.addBasicCredentials(uname, pwd);
m_clientWrapper.addBasicCredentials(uname, pwd);
clientWrapper.addBasicCredentials(ParameterMap.getKeyedString(map, "auth-user", DEFAULT_USER), ParameterMap.getKeyedString(map, "auth-password", DEFAULT_PASSWORD)); if (ParameterMap.getKeyedBoolean(map, "auth-preemptive", true)) { clientWrapper.usePreemptiveAuth();
clientWrapper.addBasicCredentials(strUser, strPasswd);
String[] streetCred = userInfo.split(":", 2); if (streetCred.length == 2) { clientWrapper.addBasicCredentials(streetCred[0], streetCred[1]); } else { LOG.warn("Illegal value found for username/password HTTP credentials: {}", userInfo);
final String[] streetCred = userInfo.split(":", 2); if (streetCred.length == 2) { wrapper.addBasicCredentials(streetCred[0], streetCred[1]); } else { LOG.warn("Illegal value found for username/password HTTP credentials: {}", userInfo);
final String[] streetCred = userInfo.split(":", 2); if (streetCred.length == 2) { wrapper.addBasicCredentials(streetCred[0], streetCred[1]); } else { LOG.warn("Illegal value found for username/password HTTP credentials: {}", userInfo);