net.i2p.util

## Class EepGet.AuthState

- java.lang.Object
- - net.i2p.util.EepGet.AuthState

- Enclosing class:
    EepGet

      protected class EepGet.AuthState
      extends Object

  Manage the authentication parameters Ref: RFC 2617 Supports both Basic and Digest, however i2ptunnel HTTP proxy has migrated all previous Basic support to Digest.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `EepGet.AUTH_MODE` | `authMode`
    `boolean` | `authSent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AuthState(String user, String pw)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,String>` | `generateAuthArgs(String method, String uri)` Generate the digest authentication parameters Ref: RFC 2617
    `String` | `getAuthHeader(String method, String uri)`
    `String` | `getPassword()`
    `String` | `getUsername()`
    `void` | `setAuthChallenge(String auth)` May be called multiple times, save the best one

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

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

- - ### Field Detail

    - #### authMode

          public EepGet.AUTH_MODE authMode

    - #### authSent

          public boolean authSent

  - ### Constructor Detail

    - #### AuthState

          public AuthState(String user,
                           String pw)

  - ### Method Detail

    - #### generateAuthArgs

          public Map<String,String> generateAuthArgs(String method,
                                                     String uri)
                                              throws IOException

      Generate the digest authentication parameters Ref: RFC 2617
      Throws:
        `IOException`

    - #### getAuthHeader

          public String getAuthHeader(String method,
                                      String uri)
                               throws IOException

      Throws:
        `IOException`

    - #### getPassword

          public String getPassword()

    - #### getUsername

          public String getUsername()

    - #### setAuthChallenge

          public void setAuthChallenge(String auth)

      May be called multiple times, save the best one