class SAML2::AuthnStatement
Attributes
authn_context_class_ref[RW]
One of the values in {Classes}. @return [String, nil]
authn_instant[RW]
@return [Time]
session_index[RW]
@return [String, nil]
session_not_on_or_after[RW]
@return [Time, nil]
Public Instance Methods
build(builder)
click to toggle source
(see Base#build
)
# File lib/saml2/authn_statement.rb, line 51 def build(builder) builder["saml"].AuthnStatement("AuthnInstant" => authn_instant.iso8601) do |authn_statement| authn_statement.parent["SessionIndex"] = session_index if session_index authn_statement.parent["SessionNotOnOrAfter"] = session_not_on_or_after.iso8601 if session_not_on_or_after authn_statement["saml"].AuthnContext do |authn_context| authn_context["saml"].AuthnContextClassRef(authn_context_class_ref) if authn_context_class_ref end end end
from_xml(node)
click to toggle source
(see Base#from_xml
)
Calls superclass method
# File lib/saml2/authn_statement.rb, line 41 def from_xml(node) super @authn_instant = Time.parse(node["AuthnInstant"]) @session_index = node["SessionIndex"] @session_not_on_or_after = Time.parse(node["SessionNotOnOrAfter"]) if node["SessionNotOnOrAfter"] @authn_context_class_ref = node.at_xpath("saml:AuthnContext/saml:AuthnContextClassRef", Namespaces::ALL)&.content&.strip end