saml-kit 1.0.25 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0132eba52685773a829377a13a8a7dae40319e8cbd70b1359107c0f5790c6c26
4
- data.tar.gz: 390adce2967ee14b748259cb46d9f0d41d5de5fdaeb5f04fecd1d4feb7099cc7
3
+ metadata.gz: f191bd5ef640639650f065bc0713c37c0c6e63456b08366298f12ff0d926883f
4
+ data.tar.gz: 8c3b7481e313d363368d7e6a7cd4206eef83147bd95e79cba705ce022571f28f
5
5
  SHA512:
6
- metadata.gz: 7d12c7fd8d1d2ae2d851bb3d1f016ca56e9b1ad6f951c08ba5875bb51fa15f13fcf1dcd779283898d1ad46eff748ec3a15013272beb69fb2f11231786ca11cd1
7
- data.tar.gz: c97f7e3f0acfbbbc4f21608b411b4785fe19cfae3c8f37c0b1ab41ba74c2aaa6bb46f67d39b989bd3d55558f92e3bb46084b7511fb04018d81317a86df8c5e56
6
+ metadata.gz: '09259f8f8570848eea183736047bb586404583c2af62d2544ad90b0cce4a2c0867dbf2194d081e4e546e50ef0f5ecf97bcd08b16e3e50f4ac512857326da9e66'
7
+ data.tar.gz: 548180ab295a60916ec0a5dd2ee2d47cfe9cc92b3639b885b1014076d4279b962ba79847a96007b296ffdc5f63cea2470348518fcf2759c3ccaab2de52174c7c
@@ -10,13 +10,18 @@ module Saml
10
10
  extend Forwardable
11
11
 
12
12
  attr_reader :assertion
13
+ attr_accessor :destination
13
14
  def_delegators :@response_builder,
14
15
  :configuration,
15
16
  :encryption_certificate
16
17
 
17
18
  def_delegators :@assertion,
18
19
  :default_name_id_format,
19
- :default_name_id_format=
20
+ :default_name_id_format=,
21
+ :destination=,
22
+ :embed_signature,
23
+ :issuer=,
24
+ :now=
20
25
 
21
26
  def initialize(response_builder, assertion)
22
27
  @response_builder = response_builder
@@ -7,11 +7,8 @@ module Saml
7
7
  # {include:file:spec/saml/kit/builders/response_spec.rb}
8
8
  class Response
9
9
  include XmlTemplatable
10
- attr_reader :user, :request
11
- attr_accessor :id, :now
12
- attr_accessor :version, :status_code, :status_message
13
- attr_accessor :issuer, :destination
14
- attr_reader :configuration
10
+ attr_reader :user, :request, :issuer, :destination, :now, :configuration
11
+ attr_accessor :id, :version, :status_code, :status_message
15
12
 
16
13
  def initialize(
17
14
  user, request = nil, configuration: Saml::Kit.configuration
@@ -55,6 +52,37 @@ module Saml
55
52
  end
56
53
  end
57
54
 
55
+ def encrypt=(value)
56
+ super(value)
57
+ return if @assertion.nil?
58
+
59
+ if value
60
+ @assertion = EncryptedAssertion.new(self, assertion) if assertion.is_a?(Assertion)
61
+ elsif assertion.is_a?(EncryptedAssertion)
62
+ @assertion = assertion.assertion if assertion.is_a?(EncryptedAssertion)
63
+ end
64
+ end
65
+
66
+ def destination=(value)
67
+ @destination = value
68
+ assertion.destination = value
69
+ end
70
+
71
+ def issuer=(value)
72
+ @issuer = value
73
+ assertion.issuer = value
74
+ end
75
+
76
+ def now=(value)
77
+ @now = value
78
+ assertion.now = value
79
+ end
80
+
81
+ def embed_signature=(value)
82
+ @embed_signature = value
83
+ assertion.embed_signature = value
84
+ end
85
+
58
86
  private
59
87
 
60
88
  def response_options
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Saml
4
4
  module Kit
5
- VERSION = '1.0.25'.freeze
5
+ VERSION = '1.0.26'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saml-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.25
4
+ version: 1.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo khan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-17 00:00:00.000000000 Z
11
+ date: 2018-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel