Sha256: 381b17784e8fea8ca2b8e6c4f58d010592ef85595fef18b89ec42f0b8608a270

Contents?: true

Size: 405 Bytes

Versions: 3

Compression:

Stored size: 405 Bytes

Contents

require 'digest/md5'

module Hull
  module Request
    class Auth  < Faraday::Middleware

      def call(env)
        env[:request_headers]["Hull-Access-Token"] = @credentials[:app_secret]
        env[:request_headers]["Hull-App-id"] = @credentials[:app_id]
        @app.call(env)
      end

      def initialize(app, credentials)
        @app, @credentials = app, credentials
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hullio-0.2.1 lib/hull/request/auth.rb
hullio-0.2.0 lib/hull/request/auth.rb
hullio-0.1.0 lib/hull/request/auth.rb