org.apache.nutch.protocol.httpclient

## Class HttpAuthenticationFactory

- java.lang.Object
- - org.apache.nutch.protocol.httpclient.HttpAuthenticationFactory

- All Implemented Interfaces:
    Configurable

      public class HttpAuthenticationFactory
      extends Object
      implements Configurable

  Provides the Http protocol implementation with the ability to authenticate when prompted. The goal is to provide multiple authentication types but for now just the `HttpBasicAuthentication` authentication type is provided.
  Author:
    Matt Tencati
  See Also:
    `HttpBasicAuthentication`, `Http`, `HttpResponse`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `WWW_AUTHENTICATE` The HTTP Authentication (WWW-Authenticate) header which is returned by a webserver requiring authentication.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpAuthenticationFactory(Configuration conf)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HttpAuthentication` | `findAuthentication(Metadata header)`
    `Configuration` | `getConf()`
    `void` | `setConf(Configuration conf)`

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

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

- - ### Field Detail

    - #### WWW_AUTHENTICATE

          public static final String WWW_AUTHENTICATE

      The HTTP Authentication (WWW-Authenticate) header which is returned by a webserver requiring authentication.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HttpAuthenticationFactory

          public HttpAuthenticationFactory(Configuration conf)

  - ### Method Detail

    - #### setConf

          public void setConf(Configuration conf)

      Specified by:
        `setConf` in interface `Configurable`

    - #### getConf

          public Configuration getConf()

      Specified by:
        `getConf` in interface `Configurable`

    - #### findAuthentication

          public HttpAuthentication findAuthentication(Metadata header)

Copyright © 2021 The Apache Software Foundation