/** * Creates a copy of the given credentials scope. * * @since 3.0 */ 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 Credentials promptForProxyCredentials( final AuthScheme authScheme, final HttpParams params, final AuthScope authscope) { LOG.debug("Proxy credentials required"); Credentials creds = null; CredentialsProvider credProvider = (CredentialsProvider)params.getParameter(CredentialsProvider.PROVIDER); if (credProvider != null) { try { creds = credProvider.getCredentials( authScheme, authscope.getHost(), authscope.getPort(), true); } catch (CredentialsNotAvailableException e) { LOG.warn(e.getMessage()); } if (creds != null) { this.state.setProxyCredentials(authscope, creds); if (LOG.isDebugEnabled()) { LOG.debug(authscope + " new credentials given"); } } } else { LOG.debug("Proxy credentials provider not available"); } return creds; }
private Credentials promptForCredentials( final AuthScheme authScheme, final HttpParams params, final AuthScope authscope) { LOG.debug("Credentials required"); Credentials creds = null; CredentialsProvider credProvider = (CredentialsProvider)params.getParameter(CredentialsProvider.PROVIDER); if (credProvider != null) { try { creds = credProvider.getCredentials( authScheme, authscope.getHost(), authscope.getPort(), false); } catch (CredentialsNotAvailableException e) { LOG.warn(e.getMessage()); } if (creds != null) { this.state.setCredentials(authscope, creds); if (LOG.isDebugEnabled()) { LOG.debug(authscope + " new credentials given"); } } } else { LOG.debug("Credentials provider not available"); } return creds; }
/** * @param host the request host for which Credentials are asked * @param scope the configured authorization scope * @return <code>true</code> if the scope's host matches the provided one */ protected boolean matchHost(final AuthScope scope, final String host) { return scope.getHost() == AuthScope.ANY_HOST || scope.getHost().equals(host); }
/** * @param host the request host for which Credentials are asked * @param scope the configured authorization scope * @return <code>true</code> if the scope's host matches the provided one */ protected boolean matchHost(final AuthScope scope, final String host) { return scope.getHost() == AuthScope.ANY_HOST || scope.getHost().equals(host); }
/** * @param host the request host for which Credentials are asked * @param scope the configured authorization scope * @return <code>true</code> if the scope's host matches the provided one */ protected boolean matchHost(final AuthScope scope, final String host) { return scope.getHost() == AuthScope.ANY_HOST || scope.getHost().equals(host); }
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 {
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 {
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 {
/** * Creates a copy of the given credentials scope. * * @since 3.0 */ 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. * * @since 3.0 */ 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. * * @since 3.0 */ 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. * * @since 3.0 */ 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 Credentials promptForProxyCredentials( final AuthScheme authScheme, final HttpParams params, final AuthScope authscope) { LOG.debug("Proxy credentials required"); Credentials creds = null; CredentialsProvider credProvider = (CredentialsProvider)params.getParameter(CredentialsProvider.PROVIDER); if (credProvider != null) { try { creds = credProvider.getCredentials( authScheme, authscope.getHost(), authscope.getPort(), true); } catch (CredentialsNotAvailableException e) { LOG.warn(e.getMessage()); } if (creds != null) { this.state.setProxyCredentials(authscope, creds); if (LOG.isDebugEnabled()) { LOG.debug(authscope + " new credentials given"); } } } else { LOG.debug("Proxy credentials provider not available"); } return creds; }
private Credentials promptForProxyCredentials( final AuthScheme authScheme, final HttpParams params, final AuthScope authscope) { LOG.debug("Proxy credentials required"); Credentials creds = null; CredentialsProvider credProvider = (CredentialsProvider)params.getParameter(CredentialsProvider.PROVIDER); if (credProvider != null) { try { creds = credProvider.getCredentials( authScheme, authscope.getHost(), authscope.getPort(), true); } catch (CredentialsNotAvailableException e) { LOG.warn(e.getMessage()); } if (creds != null) { this.state.setProxyCredentials(authscope, creds); if (LOG.isDebugEnabled()) { LOG.debug(authscope + " new credentials given"); } } } else { LOG.debug("Proxy credentials provider not available"); } return creds; }
private Credentials promptForProxyCredentials( final AuthScheme authScheme, final HttpParams params, final AuthScope authscope) { LOG.debug("Proxy credentials required"); Credentials creds = null; CredentialsProvider credProvider = (CredentialsProvider)params.getParameter(CredentialsProvider.PROVIDER); if (credProvider != null) { try { creds = credProvider.getCredentials( authScheme, authscope.getHost(), authscope.getPort(), true); } catch (CredentialsNotAvailableException e) { LOG.warn(e.getMessage()); } if (creds != null) { this.state.setProxyCredentials(authscope, creds); if (LOG.isDebugEnabled()) { LOG.debug(authscope + " new credentials given"); } } } else { LOG.debug("Proxy credentials provider not available"); } return creds; }
private Credentials promptForProxyCredentials( final AuthScheme authScheme, final HttpParams params, final AuthScope authscope) { LOG.debug("Proxy credentials required"); Credentials creds = null; CredentialsProvider credProvider = (CredentialsProvider)params.getParameter(CredentialsProvider.PROVIDER); if (credProvider != null) { try { creds = credProvider.getCredentials( authScheme, authscope.getHost(), authscope.getPort(), true); } catch (CredentialsNotAvailableException e) { LOG.warn(e.getMessage()); } if (creds != null) { this.state.setProxyCredentials(authscope, creds); if (LOG.isDebugEnabled()) { LOG.debug(authscope + " new credentials given"); } } } else { LOG.debug("Proxy credentials provider not available"); } return creds; }
private Credentials promptForProxyCredentials( final AuthScheme authScheme, final HttpParams params, final AuthScope authscope) { LOG.debug("Proxy credentials required"); Credentials creds = null; CredentialsProvider credProvider = (CredentialsProvider)params.getParameter(CredentialsProvider.PROVIDER); if (credProvider != null) { try { creds = credProvider.getCredentials( authScheme, authscope.getHost(), authscope.getPort(), true); } catch (CredentialsNotAvailableException e) { LOG.warn(e.getMessage()); } if (creds != null) { this.state.setProxyCredentials(authscope, creds); if (LOG.isDebugEnabled()) { LOG.debug(authscope + " new credentials given"); } } } else { LOG.debug("Proxy credentials provider not available"); } return creds; }
private Credentials promptForCredentials( final AuthScheme authScheme, final HttpParams params, final AuthScope authscope) { LOG.debug("Credentials required"); Credentials creds = null; CredentialsProvider credProvider = (CredentialsProvider)params.getParameter(CredentialsProvider.PROVIDER); if (credProvider != null) { try { creds = credProvider.getCredentials( authScheme, authscope.getHost(), authscope.getPort(), false); } catch (CredentialsNotAvailableException e) { LOG.warn(e.getMessage()); } if (creds != null) { this.state.setCredentials(authscope, creds); if (LOG.isDebugEnabled()) { LOG.debug(authscope + " new credentials given"); } } } else { LOG.debug("Credentials provider not available"); } return creds; }
private Credentials promptForCredentials( final AuthScheme authScheme, final HttpParams params, final AuthScope authscope) { LOG.debug("Credentials required"); Credentials creds = null; CredentialsProvider credProvider = (CredentialsProvider)params.getParameter(CredentialsProvider.PROVIDER); if (credProvider != null) { try { creds = credProvider.getCredentials( authScheme, authscope.getHost(), authscope.getPort(), false); } catch (CredentialsNotAvailableException e) { LOG.warn(e.getMessage()); } if (creds != null) { this.state.setCredentials(authscope, creds); if (LOG.isDebugEnabled()) { LOG.debug(authscope + " new credentials given"); } } } else { LOG.debug("Credentials provider not available"); } return creds; }