Class: Faraday::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/faraday/connection.rb

Overview

Reopen Faraday::Connection to add a helper to set the digest auth data.

Instance Method Summary collapse

Instance Method Details

#digest_auth(user, password) ⇒ Object

Adds the digest auth middleware at the top and sets the user and password.

Parameters:

  • user

    A String with the user.

  • password

    A String with the password.



13
14
15
# File 'lib/faraday/connection.rb', line 13

def digest_auth(user, password)
  builder.insert(0, Faraday::Request::DigestAuth, user, password)
end