Class AuthenticatingDecorator

java.lang.Object
org.apache.hc.client5.testing.classic.AuthenticatingDecorator
All Implemented Interfaces:
org.apache.hc.core5.http.io.HttpServerRequestHandler

public class AuthenticatingDecorator extends Object implements org.apache.hc.core5.http.io.HttpServerRequestHandler
  • Field Details

    • requestHandler

      private final org.apache.hc.core5.http.io.HttpServerRequestHandler requestHandler
    • authenticationHandler

      private final AuthenticationHandler<String> authenticationHandler
    • authenticator

      private final Authenticator authenticator
  • Constructor Details

    • AuthenticatingDecorator

      public AuthenticatingDecorator(org.apache.hc.core5.http.io.HttpServerRequestHandler requestHandler, AuthenticationHandler<String> authenticationHandler, Authenticator authenticator)
      Since:
      5.3
    • AuthenticatingDecorator

      public AuthenticatingDecorator(org.apache.hc.core5.http.io.HttpServerRequestHandler requestHandler, Authenticator authenticator)
  • Method Details

    • customizeUnauthorizedResponse

      protected void customizeUnauthorizedResponse(org.apache.hc.core5.http.ClassicHttpResponse unauthorized)
    • handle

      public void handle(org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.io.HttpServerRequestHandler.ResponseTrigger responseTrigger, org.apache.hc.core5.http.protocol.HttpContext context) throws org.apache.hc.core5.http.HttpException, IOException
      Specified by:
      handle in interface org.apache.hc.core5.http.io.HttpServerRequestHandler
      Throws:
      org.apache.hc.core5.http.HttpException
      IOException