lostisland / faraday

Simple, but flexible HTTP client library, with support for multiple backends.
https://lostisland.github.io/faraday
MIT License
5.73k stars 976 forks source link

Any solution for Digest Auth in Faraday 2? #1555

Closed rgaufman closed 5 months ago

rgaufman commented 6 months ago

We are still using Faraday 1 because we cannot find a solution for Digest Auth. There is an old gem for faraday-digestauth but it only works with Faraday 1 and the maintainer has abandoned the project. Is there any solution please?

We are after something like this:

      @connection = Faraday::Connection.new do |conn|
        conn.adapter Faraday.default_adapter
        conn.request :digest, username, password
      end
iMacTia commented 6 months ago

@rgaufman I've always directed people to that gem because Faraday has never supported digest auth "out-of-the-box", but I didn't realise that was incompatible with Faraday 2.

I've left a comment under your issue to ask the main maintainer of the gem if he's happy to get some help, and if he can add me as an owner to the rubygems gem for new releases.

Let's see what they reply and proceed from there. It shouldn't be hard to adapt the gem to work with Faraday 2.0.

iMacTia commented 5 months ago

It turns out faraday-digestauth works just fine with Faraday 1.x and 2.x 🙌