Module: HTTPX::Plugins::DigestAuth::InstanceMethods

Defined in:
lib/httpx/plugins/digest_auth.rb,
sig/plugins/digest_auth.rbs

Instance Method Summary collapse

Instance Method Details

#digest_auth(user, password, hashed: false) ⇒ instance

returns a session which will authenticate requests using HTTP Digest Auth, with user and password as credentials.

Parameters:

  • user (string)
  • password (string)
  • hashed: (Boolean) (defaults to: false)

Returns:

  • (instance)


38
39
40
# File 'lib/httpx/plugins/digest_auth.rb', line 38

def digest_auth(user, password, hashed: false)
  with(digest: Authentication::Digest.new(user, password, hashed: hashed))
end