class SAML2::ServiceProvider
Attributes
authn_requests_signed[W]
want_assertions_signed[W]
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/saml2/service_provider.rb, line 12 def initialize super @authn_requests_signed = nil @want_assertions_signed = nil @assertion_consumer_services = Endpoint::Indexed::Array.new @attribute_consuming_services = AttributeConsumingService::Array.new end
Public Instance Methods
assertion_consumer_services()
click to toggle source
@return [Endpoint::Indexed::Array]
# File lib/saml2/service_provider.rb, line 46 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()
click to toggle source
@return [AttributeConsumingService::Array]
# File lib/saml2/service_provider.rb, line 54 def attribute_consuming_services @attribute_consuming_services ||= begin nodes = xml.xpath("md:AttributeConsumingService", Namespaces::ALL) AttributeConsumingService::Array.from_xml(nodes) end end
authn_requests_signed?()
click to toggle source
@return [Boolean, nil]
# File lib/saml2/service_provider.rb, line 30 def authn_requests_signed? unless instance_variable_defined?(:@authn_requests_signed) @authn_requests_signed = xml["AuthnRequestsSigned"] && xml["AuthnRequestsSigned"] == "true" end @authn_requests_signed end
build(builder)
click to toggle source
(see Base#build
)
Calls superclass method
# File lib/saml2/service_provider.rb, line 62 def build(builder) builder["md"].SPSSODescriptor do |sp_sso_descriptor| super(sp_sso_descriptor) sp_sso_descriptor.parent["AuthnRequestsSigned"] = authn_requests_signed? unless authn_requests_signed?.nil? sp_sso_descriptor.parent["WantAssertionsSigned"] = want_assertions_signed? unless want_assertions_signed?.nil? 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)
click to toggle source
(see Base#from_xml
)
Calls superclass method
# File lib/saml2/service_provider.rb, line 21 def from_xml(node) super remove_instance_variable(:@authn_requests_signed) remove_instance_variable(:@want_assertions_signed) @assertion_consumer_services = nil @attribute_consuming_services = nil end
want_assertions_signed?()
click to toggle source
@return [Boolean, nil]
# File lib/saml2/service_provider.rb, line 38 def want_assertions_signed? unless instance_variable_defined?(:@want_assertions_signed) @want_assertions_signed = xml["WantAssertionsSigned"] && xml["WantAssertionsSigned"] == "true" end @want_assertions_signed end