# File lib/fog/aws/sts.rb, line 20 def self.data @data ||= Hash.new do |hash, key| hash[key] = { :owner_id => Fog::AWS::Mock.owner_id, :server_certificates => {} } end end
# File lib/fog/aws/sts.rb, line 42 def data self.class.data[@aws_access_key_id] end
# File lib/fog/aws/requests/sts/get_federation_token.rb, line 44 def get_federation_token(name, policy, duration=43200) Excon::Response.new.tap do |response| response.status = 200 response.body = { 'SessionToken' => Fog::Mock.random_base64(580), 'SecretAccessKey' => Fog::Mock.random_base64(40), 'Expiration' => (DateTime.now + duration).strftime('%FT%TZ'), 'AccessKeyId' => Fog::AWS::Mock.key_id(20), 'Arn' => "arn:aws:sts::#{Fog::AWS::Mock.owner_id}:federated-user/#{name}", 'FederatedUserId' => "#{Fog::AWS::Mock.owner_id}:#{name}", 'PackedPolicySize' => Fog::Mock.random_numbers(2), 'RequestId' => Fog::AWS::Mock.request_id } end end
Generated with the Darkfish Rdoc Generator 2.