Sha256: 246a9efdb43ba7ccfd633bc88fb31dd09713f39d461a0b5484be936f0dcccd2b

Contents?: true

Size: 281 Bytes

Versions: 6

Compression:

Stored size: 281 Bytes

Contents

# frozen_string_literal: true

module BoletoSimples
  module Middleware
    class Bearer < Faraday::Middleware
      def call(env)
        env[:request_headers]['Authorization'] = "Bearer #{BoletoSimples.configuration.api_token}"
        @app.call(env)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
boletosimples-2.1.0 lib/boletosimples/middlewares/bearer.rb
boletosimples-2.0.0 lib/boletosimples/middlewares/bearer.rb
boletosimples-1.0.4 lib/boletosimples/middlewares/bearer.rb
boletosimples-1.0.3 lib/boletosimples/middlewares/bearer.rb
boletosimples-1.0.2 lib/boletosimples/middlewares/bearer.rb
boletosimples-1.0.1 lib/boletosimples/middlewares/bearer.rb