/** * Creates an {@link AbstractAuthLogicHandler} to handle the authentication mechanism. * * @param proxyIoSession the proxy session object * @return a new logic handler * @throws ProxyAuthException If we get an error during the proxy authentication */ public AbstractAuthLogicHandler getNewHandler(ProxyIoSession proxyIoSession) throws ProxyAuthException { return getNewHandler(this.id, proxyIoSession); }
/** * Creates a new HttpDigestAuthLogicHandler instance * * @param proxyIoSession The Proxy IoSession * @throws ProxyAuthException The Proxy AuthException */ public HttpDigestAuthLogicHandler(ProxyIoSession proxyIoSession) throws ProxyAuthException { super(proxyIoSession); ((HttpProxyRequest) request).checkRequiredProperties(HttpProxyConstants.USER_PROPERTY, HttpProxyConstants.PWD_PROPERTY); }
/** * {@inheritDoc} */ @Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { if (response.getStatusCode() != 407) { throw new ProxyAuthException("Received error response code (" + response.getStatusLine() + ")."); } } }
/** * Calls writeRequest0(NextFilter, HttpProxyRequest) to write the request. * If needed a reconnection to the proxy is done previously. * * @param nextFilter the next filter * @param request the http request */ public void writeRequest(final NextFilter nextFilter, final HttpProxyRequest request) { ProxyIoSession proxyIoSession = getProxyIoSession(); if (proxyIoSession.isReconnectionNeeded()) { reconnect(nextFilter, request); } else { writeRequest0(nextFilter, request); } }
/** * {@inheritDoc} */ @Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { // Should never get here ! throw new ProxyAuthException("Received error response code (" + response.getStatusLine() + ")."); } }
/** * Sends an HTTP request. * * @param nextFilter the next filter * @param request the request to write * @throws ProxyAuthException If we get an error during the proxy authentication */ protected void writeRequest(final NextFilter nextFilter, final HttpProxyRequest request) throws ProxyAuthException { logger.debug(" sending HTTP request"); ((AbstractHttpLogicHandler) proxyIoSession.getHandler()).writeRequest(nextFilter, request); }
/** * {@inheritDoc} */ @Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { if (response.getStatusCode() != 407) { throw new ProxyAuthException("Received error response code (" + response.getStatusLine() + ")."); } } }
/** * Build an HttpNTLMAuthLogicHandler * * @param proxyIoSession The original session * @throws ProxyAuthException If we get an error during the proxy authentication */ public HttpNTLMAuthLogicHandler(final ProxyIoSession proxyIoSession) throws ProxyAuthException { super(proxyIoSession); ((HttpProxyRequest) request).checkRequiredProperties(HttpProxyConstants.USER_PROPERTY, HttpProxyConstants.PWD_PROPERTY, HttpProxyConstants.DOMAIN_PROPERTY, HttpProxyConstants.WORKSTATION_PROPERTY); }
/** * Creates an {@link AbstractAuthLogicHandler} to handle the authentication mechanism. * * @param proxyIoSession the proxy session object * @return a new logic handler */ public AbstractAuthLogicHandler getNewHandler(ProxyIoSession proxyIoSession) throws ProxyAuthException { return getNewHandler(this.id, proxyIoSession); }
/** * {@inheritDoc} */ @Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { // Should never get here ! throw new ProxyAuthException("Received error response code (" + response.getStatusLine() + ")."); } }
/** * {@inheritDoc} */ @Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { if (response.getStatusCode() != 407) { throw new ProxyAuthException("Received error response code (" + response.getStatusLine() + ")."); } } }
/** * Build an HttpBasicAuthLogicHandler * * @param proxyIoSession The proxy session * @throws ProxyAuthException If we had a probelm during the proxy authentication */ public HttpBasicAuthLogicHandler(final ProxyIoSession proxyIoSession) throws ProxyAuthException { super(proxyIoSession); ((HttpProxyRequest) request).checkRequiredProperties(HttpProxyConstants.USER_PROPERTY, HttpProxyConstants.PWD_PROPERTY); }
/** * Creates an {@link AbstractAuthLogicHandler} to handle the authentication mechanism. * * @param proxyIoSession the proxy session object * @return a new logic handler * @throws ProxyAuthException If we get an error during the proxy authentication */ public AbstractAuthLogicHandler getNewHandler(ProxyIoSession proxyIoSession) throws ProxyAuthException { return getNewHandler(this.id, proxyIoSession); }
/** * {@inheritDoc} */ @Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { // Should never get here ! throw new ProxyAuthException("Received error response code (" + response.getStatusLine() + ")."); } }
/** * {@inheritDoc} */ public HttpBasicAuthLogicHandler(final ProxyIoSession proxyIoSession) throws ProxyAuthException { super(proxyIoSession); ((HttpProxyRequest) request).checkRequiredProperties( HttpProxyConstants.USER_PROPERTY, HttpProxyConstants.PWD_PROPERTY); }
public HttpDigestAuthLogicHandler(final ProxyIoSession proxyIoSession) throws ProxyAuthException { super(proxyIoSession); ((HttpProxyRequest) request).checkRequiredProperties( HttpProxyConstants.USER_PROPERTY, HttpProxyConstants.PWD_PROPERTY); }
/** * Creates a new HttpDigestAuthLogicHandler instance * * @param proxyIoSession The Proxy IoSession * @throws ProxyAuthException The Proxy AuthException */ public HttpDigestAuthLogicHandler(ProxyIoSession proxyIoSession) throws ProxyAuthException { super(proxyIoSession); ((HttpProxyRequest) request).checkRequiredProperties(HttpProxyConstants.USER_PROPERTY, HttpProxyConstants.PWD_PROPERTY); }
/** * Build an HttpNTLMAuthLogicHandler * * @param proxyIoSession The original session * @throws ProxyAuthException If we get an error during the proxy authentication */ public HttpNTLMAuthLogicHandler(final ProxyIoSession proxyIoSession) throws ProxyAuthException { super(proxyIoSession); ((HttpProxyRequest) request).checkRequiredProperties(HttpProxyConstants.USER_PROPERTY, HttpProxyConstants.PWD_PROPERTY, HttpProxyConstants.DOMAIN_PROPERTY, HttpProxyConstants.WORKSTATION_PROPERTY); }
/** * Build an HttpBasicAuthLogicHandler * * @param proxyIoSession The proxy session * @throws ProxyAuthException If we had a probelm during the proxy authentication */ public HttpBasicAuthLogicHandler(final ProxyIoSession proxyIoSession) throws ProxyAuthException { super(proxyIoSession); ((HttpProxyRequest) request).checkRequiredProperties(HttpProxyConstants.USER_PROPERTY, HttpProxyConstants.PWD_PROPERTY); }
/** * {@inheritDoc} */ public HttpNTLMAuthLogicHandler(final ProxyIoSession proxyIoSession) throws ProxyAuthException { super(proxyIoSession); ((HttpProxyRequest) request).checkRequiredProperties( HttpProxyConstants.USER_PROPERTY, HttpProxyConstants.PWD_PROPERTY, HttpProxyConstants.DOMAIN_PROPERTY, HttpProxyConstants.WORKSTATION_PROPERTY); }