Class: SAML2::Subject

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

Defined Under Namespace

Classes: Confirmation

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#confirmationObject

Returns the value of attribute confirmation.



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

def confirmation
  @confirmation
end

#name_idObject

Returns the value of attribute name_id.



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

def name_id
  @name_id
end

Class Method Details

.from_xml(node) ⇒ Object



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

def self.from_xml(node)
  return nil unless node
  subject = new
  subject.name_id = NameID.from_xml(node.at_xpath('saml:NameID', Namespaces::ALL))

  subject
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 |builder|
    name_id.build(builder) if name_id
    confirmation.build(builder) if confirmation
  end
end