lib/saml/kit/builders/service_provider_metadata.rb in saml-kit-0.2.3 vs lib/saml/kit/builders/service_provider_metadata.rb in saml-kit-0.2.4
- old
+ new
@@ -1,23 +1,22 @@
module Saml
module Kit
module Builders
class ServiceProviderMetadata
include Saml::Kit::Templatable
- attr_accessor :id, :entity_id, :acs_urls, :logout_urls, :name_id_formats, :sign
+ attr_accessor :id, :entity_id, :acs_urls, :logout_urls, :name_id_formats
attr_accessor :organization_name, :organization_url, :contact_email
attr_accessor :want_assertions_signed
attr_reader :configuration
- def initialize(configuration = Saml::Kit.configuration)
+ def initialize(configuration: Saml::Kit.configuration)
@acs_urls = []
@configuration = configuration
@entity_id = configuration.issuer
@id = Id.generate
@logout_urls = []
@name_id_formats = [Namespaces::PERSISTENT]
- @sign = true
@want_assertions_signed = true
end
def add_assertion_consumer_service(url, binding: :http_post)
@acs_urls.push(location: url, binding: Bindings.binding_for(binding))
@@ -41,10 +40,10 @@
}
end
def descriptor_options
{
- AuthnRequestsSigned: sign,
+ AuthnRequestsSigned: sign?,
WantAssertionsSigned: want_assertions_signed,
protocolSupportEnumeration: Namespaces::PROTOCOL,
}
end
end