/** * 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(); }
@Override public Credentials getCredentials(final AuthScope authscope) { final String scheme = authscope.getScheme(); if (AuthSchemes.NTLM.equalsIgnoreCase(scheme) || AuthSchemes.SPNEGO.equalsIgnoreCase(scheme)) { return CurrentWindowsCredentials.INSTANCE; } else { return provider.getCredentials(authscope); } }
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()); }
static HttpHost authscopeToHost(AuthScope scope) { return new HttpHost(scope.getHost(), scope.getPort(), 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() + "\""); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
private static PasswordAuthentication getSystemCreds( final AuthScope authscope, final Authenticator.RequestorType requestorType) { final String hostname = authscope.getHost(); final int port = authscope.getPort(); final String protocol = port == 443 ? "https" : "http"; return Authenticator.requestPasswordAuthentication( hostname, null, port, protocol, null, translateScheme(authscope.getScheme()), null, requestorType); }
private static PasswordAuthentication getSystemCreds( final String protocol, final AuthScope authscope, final Authenticator.RequestorType requestorType) { return Authenticator.requestPasswordAuthentication( authscope.getHost(), null, authscope.getPort(), protocol, null, translateScheme(authscope.getScheme()), null, requestorType); }
/** * 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()); } }