Sha256: 8b6814f0eef799f23a35d58ba25d151f8316d223243081862ec995aa1ba1c05f

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

# -*- coding: utf-8 -*-
require 'net/http/digest_auth'
require 'faraday'
require 'faraday/digestauth/version'
require 'faraday/digestauth/connection'
require 'faraday/request/digestauth'

# Register the middleware as a Request middleware with the name :digest
if Faraday.respond_to?(:register_middleware)                 # Faraday 0.8
  Faraday.register_middleware :request, digest: Faraday::Request::DigestAuth
elsif Faraday::Request.respond_to?(:register_middleware)     # Faraday 0.9
  Faraday::Request.register_middleware digest: Faraday::Request::DigestAuth
elsif Faraday::Request.respond_to?(:register_lookup_modules) # Faraday 0.7
  Faraday::Request.register_lookup_modules digest: :DigestAuth
end

Version data entries

2 entries across 2 versions & 1 rubygems

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