public Executor auth(final HttpHost host, final String username, final char[] password) { return auth(host, new UsernamePasswordCredentials(username, password)); }
public Executor auth(final HttpHost host, final String username, final char[] password) { return auth(host, new UsernamePasswordCredentials(username, password)); }
public static void extractFromAuthority( final String scheme, final URIAuthority authority, final CredentialsStore credentialsStore) { Args.notNull(credentialsStore, "Credentials store"); if (authority == null) { return; } final String userinfo = authority.getUserInfo(); if (userinfo == null) { return; } final int atColon = userinfo.indexOf(':'); final String userName; final char[] password; if (atColon >= 0) { userName = userinfo.substring(0, atColon); password = userinfo.substring(atColon + 1).toCharArray(); } else { userName = userinfo.substring(0, atColon); password = null; } credentialsStore.setCredentials( new AuthScope(scheme, authority.getHostName(), authority.getPort(), null, AuthSchemes.BASIC.ident), new UsernamePasswordCredentials(userName, password)); }
systemcreds.getUserName(), systemcreds.getPassword(), null, null); return new UsernamePasswordCredentials(systemcreds.getUserName(), systemcreds.getPassword());