lib/saml/kit/builders/assertion.rb in saml-kit-1.0.19 vs lib/saml/kit/builders/assertion.rb in saml-kit-1.0.20

- old
+ new

@@ -48,32 +48,36 @@ xmlns: Namespaces::ASSERTION, } end def subject_confirmation_data_options - options = { NotOnOrAfter: 3.hours.since(now).utc.iso8601 } - options[:Recipient] = destination if destination.present? + options = {} options[:InResponseTo] = request.id if request.present? + options[:NotOnOrAfter] = (not_on_or_after - 1.second).iso8601 + options[:Recipient] = destination if destination.present? options end def conditions_options { NotBefore: now.utc.iso8601, - NotOnOrAfter: configuration.session_timeout.since(now).utc.iso8601, + NotOnOrAfter: not_on_or_after.iso8601, } end def authn_statement_options { AuthnInstant: now.iso8601, SessionIndex: reference_id, - SessionNotOnOrAfter: configuration.session_timeout.since(now).utc.iso8601, } end def name_id_options { Format: name_id_format || default_name_id_format } + end + + def not_on_or_after + configuration.session_timeout.since(now).utc end end end end end