class SAML2::Subject
Attributes
Public Class Methods
Source
# File lib/saml2/subject.rb, line 10 def initialize super @confirmations = [] end
Calls superclass method
SAML2::Base::new
Public Instance Methods
Source
# File lib/saml2/subject.rb, line 46 def build(builder) builder["saml"].Subject do |subject| name_id&.build(subject) Array(confirmations).each do |confirmation| confirmation.build(subject) end end end
(see Base#build
)
Source
# File lib/saml2/subject.rb, line 30 def confirmation Array.wrap(confirmations).first end
@return [Confirmation, nil]
Source
# File lib/saml2/subject.rb, line 35 def confirmation=(value) @confirmations = value.nil? ? [] : [value] confirmation end
@return [Confirmation, nil]
Source
# File lib/saml2/subject.rb, line 41 def confirmations @confirmations ||= load_object_array(xml, "saml:SubjectConfirmation", Confirmation) end
@return [Confirmation, Array<Confirmation>]
Source
# File lib/saml2/subject.rb, line 16 def from_xml(node) super @confirmations = nil end
(see Base#from_xml
)
Calls superclass method
SAML2::Base::from_xml
Source
# File lib/saml2/subject.rb, line 22 def name_id if xml && !instance_variable_defined?(:@name_id) @name_id = NameID.from_xml(xml.at_xpath("saml:NameID", Namespaces::ALL)) end @name_id end
@return [NameID]