Sha256: 0195080fcae6823b39031d71acf8ded2aee391b4f69f6104ef9a9a572e887882

Contents?: true

Size: 965 Bytes

Versions: 19

Compression:

Stored size: 965 Bytes

Contents

# frozen_string_literal: true
require 'faraday' unless defined? Faraday

module FinAppsCore
  module Middleware
    autoload :AcceptJson, 'finapps_core/middleware/request/accept_json'
    autoload :UserAgent, 'finapps_core/middleware/request/user_agent'
    autoload :NoEncodingBasicAuthentication, 'finapps_core/middleware/request/no_encoding_basic_authentication'
    autoload :TenantAuthentication, 'finapps_core/middleware/request/tenant_authentication'
    autoload :CustomLogger, 'finapps_core/middleware/response/custom_logger'

    if Faraday::Middleware.respond_to? :register_middleware
      Faraday::Request.register_middleware \
        accept_json: -> { AcceptJson },
        user_agent: -> { UserAgent },
        no_encoding_basic_authentication: -> { NoEncodingBasicAuthentication },
        tenant_authentication: -> { TenantAuthentication }
      Faraday::Response.register_middleware \
        custom_logger: -> { CustomLogger }
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
finapps_core-2.0.20 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.19 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.18 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.17 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.16 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.15 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.14 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.13 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.12 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.11 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.10 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.9 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.8 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.7 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.6 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.5 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.4 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.3 lib/finapps_core/middleware/middleware.rb
finapps_core-2.0.2 lib/finapps_core/middleware/middleware.rb