class SAML2::Assertion
Attributes
Public Class Methods
Source
# File lib/saml2/assertion.rb, line 9 def initialize super @statements = [] @conditions = Conditions.new end
Calls superclass method
Public Instance Methods
Source
# File lib/saml2/assertion.rb, line 43 def attribute_statements statements.select { |s| s.is_a?(AttributeStatement) } end
@return [Array<AttributeStatement>]
Source
# File lib/saml2/assertion.rb, line 38 def authn_statements statements.select { |s| s.is_a?(AuthnStatement) } end
@return [Array<AuthnStatement]
Source
# File lib/saml2/assertion.rb, line 53 def build(builder) builder["saml"].Assertion( "xmlns:saml" => Namespaces::SAML ) do |assertion| super(assertion) subject.build(assertion) conditions&.build(assertion) statements.each { |stmt| stmt.build(assertion) } end end
(see Base#build
)
Calls superclass method
Source
# File lib/saml2/assertion.rb, line 30 def conditions if !instance_variable_defined?(:@conditions) && xml @conditions = Conditions.from_xml(xml.at_xpath("saml:Conditions", Namespaces::ALL)) end @conditions end
@return [Conditions]
Source
# File lib/saml2/assertion.rb, line 15 def from_xml(node) super @statements = nil remove_instance_variable(:@conditions) end
Calls superclass method
Source
# File lib/saml2/assertion.rb, line 48 def statements @statements ||= load_object_array(xml, "saml:AuthnStatement|saml:AttributeStatement") end
@return [Array<AuthnStatement, AttributeStatement>]
Source
# File lib/saml2/assertion.rb, line 22 def subject if xml && !instance_variable_defined?(:@subject) @subject = Subject.from_xml(xml.at_xpath("saml:Subject", Namespaces::ALL)) end @subject end
@return [Subject, nil]