org.apache.hc.client5.testing.classic

## Class AuthenticatingDecorator

- java.lang.Object
- - org.apache.hc.client5.testing.classic.AuthenticatingDecorator

- All Implemented Interfaces:
    HttpServerRequestHandler

      public class AuthenticatingDecorator
      extends Object
      implements HttpServerRequestHandler

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.hc.core5.http.io.HttpServerRequestHandler

      `HttpServerRequestHandler.ResponseTrigger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthenticatingDecorator(HttpServerRequestHandler requestHandler, AuthenticationHandler<String> authenticationHandler, Authenticator authenticator)`
    `AuthenticatingDecorator(HttpServerRequestHandler requestHandler, Authenticator authenticator)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `customizeUnauthorizedResponse(ClassicHttpResponse unauthorized)`
    `void` | `handle(ClassicHttpRequest request, HttpServerRequestHandler.ResponseTrigger responseTrigger, HttpContext context)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AuthenticatingDecorator

          public AuthenticatingDecorator(HttpServerRequestHandler requestHandler,
                                         AuthenticationHandler<String> authenticationHandler,
                                         Authenticator authenticator)

      Since:
        5.3

    - #### AuthenticatingDecorator

          public AuthenticatingDecorator(HttpServerRequestHandler requestHandler,
                                         Authenticator authenticator)

  - ### Method Detail

    - #### customizeUnauthorizedResponse

          protected void customizeUnauthorizedResponse(ClassicHttpResponse unauthorized)

    - #### handle

          public void handle(ClassicHttpRequest request,
                             HttpServerRequestHandler.ResponseTrigger responseTrigger,
                             HttpContext context)
                      throws HttpException,
                             IOException

      Specified by:
        `handle` in interface `HttpServerRequestHandler`
      Throws:
        `HttpException`
        `IOException`

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.