diff options
| author | mo <mo@mokhan.ca> | 2018-10-22 10:30:12 -0600 |
|---|---|---|
| committer | mo <mo@mokhan.ca> | 2018-10-22 10:30:12 -0600 |
| commit | 4c28988b7cbfcf58bde8b092cbd32c0e2b21bce8 (patch) | |
| tree | 74831693aa17017ee26266f259e0672c1100b31e /lib/saml/kit | |
| parent | e393cc863c51cdd52f5a846877ebe60108bb099c (diff) | |
ensure encrypted assertion forwards changes to assertionv1.0.26
Diffstat (limited to 'lib/saml/kit')
| -rw-r--r-- | lib/saml/kit/builders/encrypted_assertion.rb | 7 | ||||
| -rw-r--r-- | lib/saml/kit/builders/response.rb | 11 |
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 |
