mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
32 lines
746 B
Ruby
32 lines
746 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
|
||
|
when 'PackedPolicySize'
|
||
|
@response[name] = @value
|
||
|
when 'RequestId'
|
||
|
@response[name] = @value
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|