Hi, On Sat, Apr 6, 2013 at 4:52 AM, Erich Bremer <[email protected]> wrote: > Digest authentication does not seem to be working. I checked with wireshark > and the auth information is not present but verified it was visible with > curl which does upload fine and does send the digest auth credentials. > > The code example used is on the following URL: > > http://www.eclipse.org/jetty/documentation/current/http-client-other.html > > under the section "Authentication Support": > > String uri ="http://domain.com/secure"; > String realm ="MyRealm"; > String user ="username"; > String pass ="password"; > > // Add authentication credentials > AuthenticationStore auth = httpClient.getAuthenticationStore(); > auth.addAuthentication(new BasicAuthentication(uri, realm, user, pass));
You are adding a BasicAuthentication for Digest authentication ? You should add a DigestAuthentication, not a BasicAuthentication. Perhaps the documentation is too laconic about... it shows an example of Basic authentication. Did you misinterpret it that the same code would work for Digest authentication too ? > ContentResponse response = httpClient > .newRequest(uri) > .send() > .get(5, TimeUnit.SECONDS); > > > There also seems to be an error in the text: > > new BasicAuthentication(uri, realm, user, pass) > looks like it is > expecting (uri, string, string, string) > not (string, string, string, string) Right. Please file an issue at the documentation component here: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Jetty -- Simone Bordet ---- http://cometd.org http://webtide.com http://intalio.com Developer advice, training, services and support from the Jetty & CometD experts. Intalio, the modern way to build business applications. _______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
