Sha256: d95eb3a8782e65b4be467e4ba52e1f7060bec94cb97bac43c8febaa678fb8ee7

Contents?: true

Size: 291 Bytes

Versions: 1

Compression:

Stored size: 291 Bytes

Contents

module FubClient
  module Middleware
    class Authentication < Faraday::Middleware
      def call(env)
        env[:request_headers]["Authorization"] = "Basic " + 
          Base64.strict_encode64("#{FubClient::Client.instance.api_key}:")
        @app.call(env)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fub_client-0.1.1 lib/fub_client/middleware/authentication.rb