Sha256: f8c3914de7eb50484c6680386de2ab3d6a268ac9a7fb6195a4b5ce1fbeacfb2a
Contents?: true
Size: 882 Bytes
Versions: 5
Compression:
Stored size: 882 Bytes
Contents
module Vacuum module Request module Signature # Internal: Middleware that signs REST requests to various Amazon API # endpoints. class Authentication < Faraday::Middleware # Initializes the middleware. # # app - An Object that responds to `call` and returns a # Faraday::Response. # secret - The String Amazon AWS access secret key. def initialize(app, secret) @secret = secret super app end # Signs the request. # # env - A Hash that contains info about the request. # # Returns an Object that responds to `call` and returns a # Faraday::Response. def call(env) builder = Builder.new env, @secret builder.timestamp.sort_query.sign @app.call builder.env end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems