lib/awsecrets.rb in awsecrets-1.6.0 vs lib/awsecrets.rb in awsecrets-1.7.0
- old
+ new
@@ -68,12 +68,15 @@
@region = creds['region'] if creds.include?('region')
end
return unless @credentials.nil? && creds &&
creds.include?('aws_access_key_id') &&
creds.include?('aws_secret_access_key')
+ session_token = nil
+ session_token = creds['aws_session_token'] if creds.include?('aws_session_token')
@credentials = Aws::Credentials.new(
creds['aws_access_key_id'],
- creds['aws_secret_access_key']
+ creds['aws_secret_access_key'],
+ session_token
)
end
def self.load_creds
return unless @credentials.nil?