Class: SAML::Metadata::EntitiesDescriptor
- Inherits:
-
Object
- Object
- SAML::Metadata::EntitiesDescriptor
- Defined in:
- lib/saml/metadata/entities_descriptor.rb
Instance Attribute Summary collapse
-
#entity_descriptors ⇒ Object
readonly
Returns the value of attribute entity_descriptors.
Class Method Summary collapse
Instance Method Summary collapse
- #from_xml(xml) ⇒ Object
- #idp ⇒ Object
- #idp_single_signon_service ⇒ Object
- #sp ⇒ Object
- #sp_assertion_consumer_service ⇒ Object
- #sp_single_logout_service ⇒ Object
Instance Attribute Details
#entity_descriptors ⇒ Object (readonly)
Returns the value of attribute entity_descriptors.
5 6 7 |
# File 'lib/saml/metadata/entities_descriptor.rb', line 5 def entity_descriptors @entity_descriptors end |
Class Method Details
.from_xml(xml) ⇒ Object
7 8 9 |
# File 'lib/saml/metadata/entities_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 |
# File 'lib/saml/metadata/entities_descriptor.rb', line 11 def from_xml(xml) @entity_descriptors = xml.get_elements('md:EntityDescriptor').map do |ed_node| EntityDescriptor.from_xml(ed_node) end self end |
#idp ⇒ Object
25 26 27 28 29 30 |
# File 'lib/saml/metadata/entities_descriptor.rb', line 25 def idp @entity_descriptors.each do |entity| return entity if entity.idp? end nil end |
#idp_single_signon_service ⇒ Object
40 41 42 |
# File 'lib/saml/metadata/entities_descriptor.rb', line 40 def idp_single_signon_service idp.idp_sso_descriptors.first.single_signon_services.first end |
#sp ⇒ Object
18 19 20 21 22 23 |
# File 'lib/saml/metadata/entities_descriptor.rb', line 18 def sp @entity_descriptors.each do |entity| return entity if entity.sp? end nil end |
#sp_assertion_consumer_service ⇒ Object
32 33 34 |
# File 'lib/saml/metadata/entities_descriptor.rb', line 32 def sp_assertion_consumer_service sp.sp_sso_descriptors.first.assertion_consumer_services.first end |
#sp_single_logout_service ⇒ Object
36 37 38 |
# File 'lib/saml/metadata/entities_descriptor.rb', line 36 def sp_single_logout_service sp.sp_sso_descriptors.first.single_logout_services.first end |