code: @Override
      public void doHandshake(final NextFilter nextFilter)
              throws ProxyAuthException {
          logger.debug(" doHandshake()");
  
          if (step > 0) {
              throw new ProxyAuthException("Authentication request already sent");
          }
  
          // Send request
          HttpProxyRequest req = (HttpProxyRequest) request;
          Map<String, List<String>> headers = req.getHeaders() != null ? req
                  .getHeaders() : new HashMap<>();
  
          String username = req.getProperties().get(
                  HttpProxyConstants.USER_PROPERTY);
          String password = req.getProperties().get(
                  HttpProxyConstants.PWD_PROPERTY);
  
          StringUtilities.addValueToHeader(headers, "Proxy-Authorization",
                  "Basic " + createAuthorization(username, password), true);
  
          addKeepAliveHeaders(headers);
          req.setHeaders(headers);
  
          writeRequest(nextFilter, req);
          step++;
      }
docs: {@inheritDoc}