/** * Creates a copy of the given credentials scope. */ public AuthScope(final AuthScope authscope) { super(); if (authscope == null) { throw new IllegalArgumentException("Scope may not be null"); } this.host = authscope.getHost(); this.port = authscope.getPort(); this.realm = authscope.getRealm(); this.scheme = authscope.getScheme(); }
private CredentialsProvider getDelegate( AuthScope authScope ) { if ( proxy.getPort() == authScope.getPort() && proxy.getHostName().equalsIgnoreCase( authScope.getHost() ) ) { return proxyCredentialsProvider; } return serverCredentialsProvider; }
/** * {@inheritDoc} */ @Override public Credentials getCredentials(AuthScope authScope) { synchronized (lock) { return proxies.get(authScope.getHost() + ":" + authScope.getPort()); } }
@Deprecated static public HTTPSession newSession(AuthScope scope) throws HTTPException { HttpHost hh = new HttpHost(scope.getHost(), scope.getPort(), null); return new HTTPSession(hh); }
private void writeObject(final ObjectOutputStream stream) throws IOException { stream.writeObject(authScope_.getHost()); stream.writeInt(authScope_.getPort()); stream.writeObject(authScope_.getRealm()); stream.writeObject(authScope_.getScheme()); }
private void writeObject(final ObjectOutputStream stream) throws IOException { stream.writeObject(authScope_.getHost()); stream.writeInt(authScope_.getPort()); stream.writeObject(authScope_.getRealm()); stream.writeObject(authScope_.getScheme()); } private void readObject(final ObjectInputStream stream) throws IOException, ClassNotFoundException {
static public void serializeScope(AuthScope scope, ObjectOutputStream oos) throws IOException { oos.writeObject(scope.getHost()); oos.writeInt(scope.getPort()); oos.writeObject(scope.getRealm()); oos.writeObject(scope.getScheme()); }
/** * Basic setter */ private void setAuthScope(AuthScope authScope) { this.authScope = authScope; log.info("Host=\"" + authScope.getHost() + "\""); log.info("Port=\"" + authScope.getPort() + "\""); log.info("Realm=\"" + authScope.getRealm() + "\""); log.info("Scheme=\"" + authScope.getScheme() + "\""); }
static HttpHost authscopeToHost(AuthScope scope) { return new HttpHost(scope.getHost(), scope.getPort(), scope.getScheme()); }
/** * Creates a copy of the given credentials scope. */ public AuthScope(final AuthScope authscope) { super(); if (authscope == null) { throw new IllegalArgumentException("Scope may not be null"); } this.host = authscope.getHost(); this.port = authscope.getPort(); this.realm = authscope.getRealm(); this.scheme = authscope.getScheme(); }
/** * Creates a copy of the given credentials scope. */ public AuthScope(final AuthScope authscope) { super(); if (authscope == null) { throw new IllegalArgumentException("Scope may not be null"); } this.host = authscope.getHost(); this.port = authscope.getPort(); this.realm = authscope.getRealm(); this.scheme = authscope.getScheme(); }
public Credentials getCredentials(AuthScope scope) //AuthScheme authscheme, String host, int port, boolean isproxy) { UsernamePasswordCredentials creds = new UsernamePasswordCredentials(username, password); logger.info("TestCredentials.getCredentials called: creds=|{}| host={} port={}}", creds.toString(), scope.getHost(), scope.getPort()); this.counter++; return creds; }
/** * Creates a copy of the given credentials scope. */ public AuthScope(final AuthScope authscope) { super(); Args.notNull(authscope, "Scope"); this.host = authscope.getHost(); this.port = authscope.getPort(); this.realm = authscope.getRealm(); this.scheme = authscope.getScheme(); }
public Credentials getCredentials(AuthScope scope) //AuthScheme authscheme, String host, int port, boolean isproxy) { UsernamePasswordCredentials creds = new UsernamePasswordCredentials(username, password); System.err.printf("TestCredentials.getCredentials called: creds=|%s| host=%s port=%d%n", creds.toString(), scope.getHost(), scope.getPort()); return creds; }
/** * Creates a copy of the given credentials scope. */ public AuthScope(final AuthScope authscope) { super(); Args.notNull(authscope, "Scope"); this.host = authscope.getHost(); this.port = authscope.getPort(); this.realm = authscope.getRealm(); this.scheme = authscope.getScheme(); this.origin = authscope.getOrigin(); }
/** * Creates a copy of the given credentials scope. */ public AuthScope(final AuthScope authscope) { super(); Args.notNull(authscope, "Scope"); this.host = authscope.getHost(); this.port = authscope.getPort(); this.realm = authscope.getRealm(); this.scheme = authscope.getScheme(); this.origin = authscope.getOrigin(); }
/** * Creates a copy of the given credentials scope. */ public AuthScope(final AuthScope authscope) { super(); Args.notNull(authscope, "Scope"); this.host = authscope.getHost(); this.port = authscope.getPort(); this.realm = authscope.getRealm(); this.scheme = authscope.getScheme(); this.origin = authscope.getOrigin(); }
/** * Creates a copy of the given credentials scope. */ public AuthScope(final AuthScope authscope) { super(); Args.notNull(authscope, "Scope"); this.host = authscope.getHost(); this.port = authscope.getPort(); this.realm = authscope.getRealm(); this.scheme = authscope.getScheme(); this.origin = authscope.getOrigin(); }
/** * Creates a copy of the given credentials scope. */ public AuthScope(final AuthScope authscope) { super(); Args.notNull(authscope, "Scope"); this.host = authscope.getHost(); this.port = authscope.getPort(); this.realm = authscope.getRealm(); this.scheme = authscope.getScheme(); this.origin = authscope.getOrigin(); }
public int hashCode() { if (myScope == null) { return 0; } return myScope.getPort() + ComparisonUtil.hashCode(myScope.getHost()) + ComparisonUtil.hashCode(myScope.getScheme()) + ComparisonUtil.hashCode(myScope.getRealm()); } }