Class: SAML::Metadata::EntityDescriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/saml/metadata/entity_descriptor.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#entity_idObject

Returns the value of attribute entity_id.



5
6
7
# File 'lib/saml/metadata/entity_descriptor.rb', line 5

def entity_id
  @entity_id
end

Class Method Details

.from_xml(xml) ⇒ Object



7
8
9
# File 'lib/saml/metadata/entity_descriptor.rb', line 7

def self.from_xml(xml)
  allocate.from_xml(xml)
end

Instance Method Details

#from_xml(xml) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/saml/metadata/entity_descriptor.rb', line 11

def from_xml(xml)
  @entity_id = xml.attributes['entityID']
  @sp_sso_descriptors = xml.get_elements('md:SPSSODescriptor').map do |elem|
    SPSSODescriptor.from_xml(elem)
  end
  @idp_sso_descriptors = xml.get_elements('md:IDPSSODescriptor').map do |elem|
    IDPSSODescriptor.from_xml(elem)
  end
  self
end

#idp?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/saml/metadata/entity_descriptor.rb', line 34

def idp?
  not @idp_sso_descriptors.empty?
end

#idp_sso_descriptorsObject



26
27
28
# File 'lib/saml/metadata/entity_descriptor.rb', line 26

def idp_sso_descriptors
  @idp_sso_descriptors.clone
end

#sp?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/saml/metadata/entity_descriptor.rb', line 30

def sp?
  not @sp_sso_descriptors.empty?
end

#sp_sso_descriptorsObject



22
23
24
# File 'lib/saml/metadata/entity_descriptor.rb', line 22

def sp_sso_descriptors
  @sp_sso_descriptors.clone
end