From 90b850f1d24412e7f7eeb23a065940c2868e8b15 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Wed, 3 Jul 2013 16:11:13 -0400 Subject: [PATCH] Signature method requires x-amz-security-token header. --- lib/fog/aws/storage.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fog/aws/storage.rb b/lib/fog/aws/storage.rb index 134e10845..cb0bf190b 100644 --- a/lib/fog/aws/storage.rb +++ b/lib/fog/aws/storage.rb @@ -491,13 +491,14 @@ DATA refresh_credentials_if_expired expires = Fog::Time.now.to_date_header + + params[:headers]['x-amz-security-token'] = @aws_session_token if @aws_session_token signature = signature(params, expires) params = request_params(params) params.delete(:port) unless params[:port] params[:headers]['Date'] = expires - params[:headers]['x-amz-security-token'] = @aws_session_token if @aws_session_token params[:headers]['Authorization'] = "AWS #{@aws_access_key_id}:#{signature}" # FIXME: ToHashParser should make this not needed original_params = params.dup