lib/casclient/responses.rb in rubycas-client-2.0.1 vs lib/casclient/responses.rb in rubycas-client-2.1.0

- old
+ new

@@ -66,9 +66,18 @@ @extra_attributes = {} @xml.elements.to_a('//cas:authenticationSuccess/*').each do |el| @extra_attributes.merge!(Hash.from_xml(el.to_s)) unless el.prefix == 'cas' end + + # unserialize extra attributes + @extra_attributes.each do |k, v| + if v.blank? + @extra_attributes[k] = nil + else + @extra_attributes[k] = YAML.load(v) + end + end elsif is_failure? @failure_code = @xml.elements['//cas:authenticationFailure'].attributes['code'] @failure_message = @xml.elements['//cas:authenticationFailure'].text.strip else # this should never happen, since the response should already have been recognized as invalid \ No newline at end of file