Sha256: 47754e044903c4eb3e559fe4fe66ffa051f8c34d8f693a396db7ad3bd94c8eb1

Contents?: true

Size: 413 Bytes

Versions: 10

Compression:

Stored size: 413 Bytes

Contents

# Request middleware that performs HMAC request signing
class Ey::Hmac::Rack
  attr_reader :key_id, :key_secret, :options

  def initialize(app, key_id, key_secret, options = {})
    @app = app
    @key_id, @key_secret = key_id, key_secret
    @options = options
  end

  def call(env)
    Ey::Hmac.sign!(env, key_id, key_secret, { adapter: Ey::Hmac::Adapter::Rack }.merge(options))

    @app.call(env)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ey-hmac-2.3.0 lib/ey-hmac/rack.rb
ey-hmac-2.2.0 lib/ey-hmac/rack.rb
ey-hmac-2.1.0 lib/ey-hmac/rack.rb
ey-hmac-2.0.2 lib/ey-hmac/rack.rb
ey-hmac-2.0.1 lib/ey-hmac/rack.rb
ey-hmac-2.0.0 lib/ey-hmac/rack.rb
ey-hmac-1.0.0 lib/ey-hmac/rack.rb
ey-hmac-0.1.3 lib/ey-hmac/rack.rb
ey-hmac-0.1.2 lib/ey-hmac/rack.rb
ey-hmac-0.1.1 lib/ey-hmac/rack.rb