lib/ciam/ruby-saml/response.rb in ciam-es-0.0.5 vs lib/ciam/ruby-saml/response.rb in ciam-es-0.0.6
- old
+ new
@@ -96,11 +96,16 @@
@expires_at ||= begin
node = REXML::XPath.first(document, "/p:Response/a:Assertion/a:AuthnStatement", { "p" => PROTOCOL, "a" => ASSERTION })
parse_time(node, "SessionNotOnOrAfter")
end
end
-
+ def session_index
+ @session_index ||= begin
+ node = REXML::XPath.first(document, "/p:Response/a:Assertion/a:AuthnStatement", { "p" => PROTOCOL, "a" => ASSERTION })
+ node.attributes["SessionIndex"] unless node.blank?
+ end
+ end
# Checks the status of the response for a "Success" code
def success?
@status_code ||= begin
node = REXML::XPath.first(document, "/p:Response/p:Status/p:StatusCode", { "p" => PROTOCOL, "a" => ASSERTION })