Sha256: 29926e0eb09109628cb26d18b3d9fdbe991c4fab3508ba71793206aea0d6e56f
Contents?: true
Size: 502 Bytes
Versions: 4
Compression:
Stored size: 502 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] env[:request_headers]["Hull-User-Id"] = @credentials[:user_id] if @credentials[:user_id] @app.call(env) end def initialize(app, credentials) @app, @credentials = app, credentials end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
hullio-0.3.3 | lib/hull/request/auth.rb |
hullio-0.3.2 | lib/hull/request/auth.rb |
hullio-0.3.1 | lib/hull/request/auth.rb |
hullio-0.3.0 | lib/hull/request/auth.rb |