diff options
Diffstat (limited to 'lib/chef/http/auth_credentials.rb')
-rw-r--r-- | lib/chef/http/auth_credentials.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/http/auth_credentials.rb b/lib/chef/http/auth_credentials.rb index 3db8b1bfe8..d5dbff3758 100644 --- a/lib/chef/http/auth_credentials.rb +++ b/lib/chef/http/auth_credentials.rb @@ -28,7 +28,7 @@ class Chef class AuthCredentials attr_reader :client_name, :key - def initialize(client_name=nil, key=nil) + def initialize(client_name = nil, key = nil) @client_name, @key = client_name, key end @@ -36,7 +36,7 @@ class Chef !!key end - def signature_headers(request_params={}) + def signature_headers(request_params = {}) raise ArgumentError, "Cannot sign the request without a client name, check that :node_name is assigned" if client_name.nil? Chef::Log.debug("Signing the request as #{client_name}") @@ -48,8 +48,8 @@ class Chef host = request_params.delete(:host) || "localhost" sign_obj = Mixlib::Authentication::SignedHeaderAuth.signing_object(request_params) - signed = sign_obj.sign(key).merge({:host => host}) - signed.inject({}){|memo, kv| memo["#{kv[0].to_s.upcase}"] = kv[1];memo} + signed = sign_obj.sign(key).merge({ :host => host }) + signed.inject({}) { |memo, kv| memo["#{kv[0].to_s.upcase}"] = kv[1];memo } end end |