Class: SAML2::Subject

Inherits:
Base
  • Object
show all
Defined in:
lib/saml2/subject.rb

Defined Under Namespace

Classes: Confirmation

Instance Attribute Summary collapse

Attributes inherited from Base

#xml

Instance Method Summary collapse

Methods inherited from Base

from_xml, #from_xml, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml

Instance Attribute Details

#confirmationObject

Returns the value of attribute confirmation.



7
8
9
# File 'lib/saml2/subject.rb', line 7

def confirmation
  @confirmation
end

#name_idObject



9
10
11
12
13
14
# File 'lib/saml2/subject.rb', line 9

def name_id
  if xml && !instance_variable_defined?(:@name_id)
    @name_id = NameID.from_xml(node.at_xpath('saml:NameID', Namespaces::ALL))
  end
  @name_id
end

Instance Method Details

#build(builder) ⇒ Object



16
17
18
19
20
21
# File 'lib/saml2/subject.rb', line 16

def build(builder)
  builder['saml'].Subject do |subject|
    name_id.build(subject) if name_id
    confirmation.build(subject) if confirmation
  end
end