summaryrefslogtreecommitdiff
path: root/lib/saml
diff options
context:
space:
mode:
authormo <mo@mokhan.ca>2018-10-22 10:30:12 -0600
committermo <mo@mokhan.ca>2018-10-22 10:30:12 -0600
commit4c28988b7cbfcf58bde8b092cbd32c0e2b21bce8 (patch)
tree74831693aa17017ee26266f259e0672c1100b31e /lib/saml
parente393cc863c51cdd52f5a846877ebe60108bb099c (diff)
ensure encrypted assertion forwards changes to assertionv1.0.26
Diffstat (limited to 'lib/saml')
-rw-r--r--lib/saml/kit/builders/encrypted_assertion.rb7
-rw-r--r--lib/saml/kit/builders/response.rb11
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/saml/kit/builders/encrypted_assertion.rb b/lib/saml/kit/builders/encrypted_assertion.rb
index 7c646f1..782ca03 100644
--- a/lib/saml/kit/builders/encrypted_assertion.rb
+++ b/lib/saml/kit/builders/encrypted_assertion.rb
@@ -10,13 +10,18 @@ module Saml
extend Forwardable
attr_reader :assertion
+ attr_accessor :destination
def_delegators :@response_builder,
:configuration,
:encryption_certificate
def_delegators :@assertion,
:default_name_id_format,
- :default_name_id_format=
+ :default_name_id_format=,
+ :destination=,
+ :embed_signature,
+ :issuer=,
+ :now=
def initialize(response_builder, assertion)
@response_builder = response_builder
diff --git a/lib/saml/kit/builders/response.rb b/lib/saml/kit/builders/response.rb
index bab506f..87cd4cc 100644
--- a/lib/saml/kit/builders/response.rb
+++ b/lib/saml/kit/builders/response.rb
@@ -52,6 +52,17 @@ module Saml
end
end
+ def encrypt=(value)
+ super(value)
+ return if @assertion.nil?
+
+ if value
+ @assertion = EncryptedAssertion.new(self, assertion) if assertion.is_a?(Assertion)
+ elsif assertion.is_a?(EncryptedAssertion)
+ @assertion = assertion.assertion if assertion.is_a?(EncryptedAssertion)
+ end
+ end
+
def destination=(value)
@destination = value
assertion.destination = value