def add_signing_headers(verb, path, request)
      log.info "Adding signed header authentication..."

      authentication = Authentication.from_options(
        user: client,
        key:  key,
        verb: verb,
        path: path,
        body: request.body || request.body_stream,
      )

      authentication.headers.each do |key, value|
        log.debug "#{key}: #{value}"
        request[key] = value
      end

      if request.body_stream
        request.body_stream.rewind
      end
    end
def add_signing_headers(verb, path, request)
      log.info "Adding signed header authentication..."

      authentication = Authentication.from_options(
        user: client,
        key:  key,
        verb: verb,
        path: path,
        body: request.body || request.body_stream,
      )

      authentication.headers.each do |key, value|
        log.debug "#{key}: #{value}"
        request[key] = value
      end

      if request.body_stream
        request.body_stream.rewind
      end
    end
Create a signed header authentication that can be consumed by
 +Mixlib::Authentication+.

 @param [Symbol] verb
   the HTTP verb (e.g. +:get+)
 @param [String] path
   the requested URI path (e.g. +/resources/foo+)
 @param [Net::HTTP::Request] request