class SAML2::Subject
Attributes
confirmations[W]
name_id[W]
Public Class Methods
new()
click to toggle source
Calls superclass method
SAML2::Base::new
# File lib/saml2/subject.rb, line 10 def initialize super @confirmations = [] end
Public Instance Methods
build(builder)
click to toggle source
(see Base#build
)
# 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
confirmation()
click to toggle source
@return [Confirmation, nil]
# File lib/saml2/subject.rb, line 30 def confirmation Array.wrap(confirmations).first end
confirmation=(value)
click to toggle source
@return [Confirmation, nil]
# File lib/saml2/subject.rb, line 35 def confirmation=(value) @confirmations = value.nil? ? [] : [value] confirmation end
confirmations()
click to toggle source
@return [Confirmation, Array<Confirmation>]
# File lib/saml2/subject.rb, line 41 def confirmations @confirmations ||= load_object_array(xml, "saml:SubjectConfirmation", Confirmation) end
from_xml(node)
click to toggle source
(see Base#from_xml
)
Calls superclass method
SAML2::Base::from_xml
# File lib/saml2/subject.rb, line 16 def from_xml(node) super @confirmations = nil end
name_id()
click to toggle source
@return [NameID]
# 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