module Gatherr
  module Api
    module Middleware
      class Auth < Faraday::Middleware
        def initialize(app, options={})
          @app = app
          @options = options
        end

        def call(env)
          env[:request_headers]["Authorization"] = "Bearer #{Session.token}"
          @app.call(env)
        end
      end
    end
  end
end
