lib/saml/kit/builders/assertion.rb in saml-kit-1.0.18 vs lib/saml/kit/builders/assertion.rb in saml-kit-1.0.19
- old
+ new
@@ -11,13 +11,16 @@
def_delegators :@response_builder,
:request, :issuer, :reference_id, :now, :configuration, :user,
:version, :destination
+ attr_accessor :default_name_id_format
+
def initialize(response_builder, embed_signature)
@response_builder = response_builder
self.embed_signature = embed_signature
+ self.default_name_id_format = Saml::Kit::Namespaces::UNSPECIFIED_NAMEID
end
def name_id_format
request.try(:name_id_format)
end
@@ -67,10 +70,10 @@
SessionNotOnOrAfter: configuration.session_timeout.since(now).utc.iso8601,
}
end
def name_id_options
- { Format: name_id_format || Saml::Kit::Namespaces::UNSPECIFIED_NAMEID }
+ { Format: name_id_format || default_name_id_format }
end
end
end
end
end