Sha256: 036c4d0675fb278ec7160213cad5683ef80a209564498414be9dee20aa7a0466

Contents?: true

Size: 604 Bytes

Versions: 2

Compression:

Stored size: 604 Bytes

Contents

require "azure/configuration"

module Azure
  module ServiceBus
    module Auth
      class Authorizer
        # Public: Signs an HTTP request before it's made, by adding the
        # Authorization header.
        #
        # request - An Azure::Request that hasn't been signed.
        # signer  - A signing strategy, such as Azure::ServiceBus::Auth::Wrap.
        #
        # Returns the modified request.
        def sign(request, signer)
          signature = signer.sign(request)
          request.headers["Authorization"] = "#{signature}"
          request
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
azure-0.1.1 lib/azure/service_bus/auth/authorizer.rb
azure-0.1.0 lib/azure/service_bus/auth/authorizer.rb