Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261605

java.net.Authenticator cannot handle Negotiate or Digest authentication

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 11
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      The java.net.Authenticator class supports Basic authentication only. If there is a requirement to support Negotiate authentication (Kerberos) with the java.net.http.HttpClient, an Authenticator cannot be used. The calling code must handle the 401 response and generate the required Authorizaiton headers.

      However use of Authenticator is _required_ if a proxy server requiring authentication is in use with https:// URLs - the proxy authentication headers must be set on the CONNECT call to the proxy. Once an Authenticator has been set on HttpClient for use with a proxy, it becomes impossible for the calling code to handle Negotiate authentication.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dfuchs Daniel Fuchs
              Reporter:
              revans Richard Evans
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: