1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Signature method requires x-amz-security-token header.

This commit is contained in:
Adam Tucker 2013-07-03 16:11:13 -04:00
parent 9cdc2bce09
commit 90b850f1d2

View file

@ -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