Sha256: fa85f82ba8a8e0a1c078755426bcb1a73253cebf6994eb9eaf2c1eb2d6369975

Contents?: true

Size: 517 Bytes

Versions: 3

Compression:

Stored size: 517 Bytes

Contents

# -*- coding: utf-8 -*-
module Faraday
  module DigestAuth
    # Connection methods
    module Connection
      # Public: Adds the digest auth middleware at the top and sets the user and
      # password.
      #
      # user     - A String with the user.
      # password - A String with the password.
      #
      def digest_auth(user, password)
        builder.insert(0, Faraday::Request::DigestAuth, user, password)
      end
    end
  end
end

Faraday::Connection.send :include, Faraday::DigestAuth::Connection

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
faraday-digestauth-0.3.0 lib/faraday/digestauth/connection.rb
faraday-digestauth-0.2.1 lib/faraday/digestauth/connection.rb
faraday-digestauth-0.2.0 lib/faraday/digestauth/connection.rb