Add support for Temporary Security Tokens #131

Closed
wants to merge 1 commit into
from
@@ -448,6 +448,7 @@ def generate_request_impl(verb, action, options={}, custom_options={}) #:nodoc:
"AWSAccessKeyId" => @aws_access_key_id,
"Version" => custom_options[:api_version] || @params[:api_version] }
service_hash.merge!(options)
+ service_hash["SecurityToken"] = @params[:token] if @params[:token]
# Sign request options
service_params = signed_service_params(@aws_secret_access_key, service_hash, http_verb, @params[:host_to_sign], @params[:service])
# Use POST if the length of the query string is too large
View
@@ -120,6 +120,7 @@ def self.api
# * <tt>:logger</tt>: for log messages, default: RAILS_DEFAULT_LOGGER else STDOUT
# * <tt>:signature_version</tt>: The signature version : '0','1' or '2'(default)
# * <tt>:cache</tt>: true/false: caching for: ec2_describe_images, describe_instances,
+ # * <tt>:token</tt>: Option SecurityToken for temporary credentials
# describe_images_by_owner, describe_images_by_executable_by, describe_availability_zones,
# describe_security_groups, describe_key_pairs, describe_addresses,
# describe_volumes, describe_snapshots methods, default: false.