clj-http icon indicating copy to clipboard operation
clj-http copied to clipboard

Allow for specifying the preferred auth schemes in http requests.

Open fourteatoo opened this issue 6 years ago • 1 comments

In my specific case that patch allowed me to work around an annoying warning at each and every http request that crowded the log file:

[2019-06-05T12:40:01,590][WARN ][o.a.h.i.a.HttpAuthenticator] NEGOTIATE authentication error: Invalid name provided (Mechanism level: KrbException: Cannot locate default realm)

The server accepts NEGOTIATE and NTLM but NEGOTIATE fails.

The patch lets me do requests like this:

(get "http://whatever-ms-server.com/some/page.aspx"
     {:ntlm-auth ["user" "password"]
      :auth-schemes ["NTLM"]})

The :auth-schemes parameter avoids the NEGOTIATE attempt.

fourteatoo avatar Jun 05 '19 11:06 fourteatoo

@fourtytoo would you mind adding a blurb to the README including this option? Otherwise I think it'd probably get lost without documentation.

dakrone avatar Jun 10 '19 04:06 dakrone