mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
31 lines
752 B
Ruby
31 lines
752 B
Ruby
module Fog
|
|
module Parsers
|
|
module AWS
|
|
module STS
|
|
|
|
class GetSessionToken < Fog::Parsers::Base
|
|
# http://docs.amazonwebservices.com/IAM/latest/UserGuide/index.html?CreatingFedTokens.html
|
|
|
|
def reset
|
|
@response = {}
|
|
end
|
|
|
|
def end_element(name)
|
|
case name
|
|
when 'SessionToken', 'SecretAccessKey', 'Expiration', 'AccessKeyId'
|
|
@response[name] = @value.strip
|
|
when 'Arn', 'FederatedUserId'
|
|
@response[name] = @value.strip
|
|
when 'PackedPolicySize'
|
|
@response[name] = @value
|
|
when 'RequestId'
|
|
@response[name] = @value
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|
|
end
|