Class: SAML2::ServiceProvider
- Defined in:
- lib/saml2/service_provider.rb
Instance Attribute Summary
Attributes inherited from Role
#fingerprints, #keys, #private_keys, #supported_protocols
Attributes included from OrganizationAndContacts
Attributes inherited from Base
Instance Method Summary collapse
- #assertion_consumer_services ⇒ Endpoint::Indexed::Array
- #attribute_consuming_services ⇒ AttributeConsumingService::Array
-
#build(builder) ⇒ void
Serialize this object to XML, as part of a larger document.
-
#from_xml(node) ⇒ void
Parse an XML element into this object.
-
#initialize ⇒ ServiceProvider
constructor
A new instance of ServiceProvider.
Methods inherited from SSO
#name_id_formats, #single_logout_services
Methods inherited from Role
#encryption_keys, #signing_keys
Methods included from Signable
#sign, #signature, #signed?, #signing_key, #valid_signature?, #validate_signature
Methods inherited from Base
#decrypt, from_xml, #inspect, load_object_array, load_string_array, lookup_qname, #to_s, #to_xml
Constructor Details
#initialize ⇒ ServiceProvider
Returns a new instance of ServiceProvider.
10 11 12 13 14 |
# File 'lib/saml2/service_provider.rb', line 10 def initialize super @assertion_consumer_services = Endpoint::Indexed::Array.new @attribute_consuming_services = AttributeConsumingService::Array.new end |
Instance Method Details
#assertion_consumer_services ⇒ Endpoint::Indexed::Array
24 25 26 27 28 29 |
# File 'lib/saml2/service_provider.rb', line 24 def assertion_consumer_services @assertion_consumer_services ||= begin nodes = xml.xpath('md:AssertionConsumerService', Namespaces::ALL) Endpoint::Indexed::Array.from_xml(nodes) end end |
#attribute_consuming_services ⇒ AttributeConsumingService::Array
32 33 34 35 36 37 |
# File 'lib/saml2/service_provider.rb', line 32 def attribute_consuming_services @attribute_consuming_services ||= begin nodes = xml.xpath('md:AttributeConsumingService', Namespaces::ALL) AttributeConsumingService::Array.from_xml(nodes) end end |
#build(builder) ⇒ void
This method returns an undefined value.
Serialize this object to XML, as part of a larger document
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/saml2/service_provider.rb', line 40 def build(builder) builder['md'].SPSSODescriptor do |sp_sso_descriptor| super(sp_sso_descriptor) assertion_consumer_services.each do |acs| acs.build(sp_sso_descriptor, 'AssertionConsumerService') end attribute_consuming_services.each do |acs| acs.build(sp_sso_descriptor) end end end |
#from_xml(node) ⇒ void
This method returns an undefined value.
Parse an XML element into this object.
17 18 19 20 21 |
# File 'lib/saml2/service_provider.rb', line 17 def from_xml(node) super @assertion_consumer_services = nil @attribute_consuming_services = nil end |