libsaml 2.20.0 → 2.20.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 03f151738b652768bfa0a378d0e3f8b2a346b542
4
- data.tar.gz: be0de973fd8ee3c11d37261a09b973e57cf2621d
3
+ metadata.gz: b76d5d6a0eb05d98c76af83bb4336700ad5ad558
4
+ data.tar.gz: 64b037e228a802afe167ce0324cbaa0024dcf4f4
5
5
  SHA512:
6
- metadata.gz: 0a91727caf2cbdc4daaed5502f0946a691d3a2569b1bf3281e19b1b619132cbb53521d943b6a8ac3cd05f9f0d340651d04e5c08fa1646c259f4e3ab62a86eff7
7
- data.tar.gz: 08f0988500ce8071e51470212f548bb86cc38ea54ea2c501dc3dbb58f2449b457e786e55ad725c0e2580cc60b89aaa9f60f8dcada8e48430797b7a90e2205884
6
+ metadata.gz: 1caf958c18c3010f7a86f7519b84365e087840211a4fdd7101c05058c046ce731c626f2f2d254bb000a635ea0f6c6705684f9af41e54b7aace1b90339f449ed3
7
+ data.tar.gz: dee652e2492125de67d07ea41f634e3347fc77e389e2d6ac8bc71ed0418b8c834b3a768d1a03400c00a4b4e5374accc2fb878c1c518c60a3cd9cd51754584cc9
@@ -32,10 +32,15 @@ module Saml
32
32
 
33
33
  def initialize(*args)
34
34
  options = args.extract_options!
35
- @subject = Saml::Elements::Subject.new(:name_id => options.delete(:name_id),
36
- :name_id_format => options.delete(:name_id_format),
37
- :recipient => options.delete(:recipient),
38
- :in_response_to => options.delete(:in_response_to))
35
+ if options[:subject].present?
36
+ @subject = options.delete(:subject)
37
+ else
38
+ @subject = Saml::Elements::Subject.new(:name_id => options.delete(:name_id),
39
+ :name_id_format => options.delete(:name_id_format),
40
+ :recipient => options.delete(:recipient),
41
+ :in_response_to => options.delete(:in_response_to))
42
+ end
43
+
39
44
  @conditions = Saml::Elements::Conditions.new(:audience => options.delete(:audience))
40
45
  @authn_statement = Saml::Elements::AuthnStatement.new(:authn_instant => Time.now,
41
46
  :address => options.delete(:address),
@@ -17,23 +17,25 @@ module Saml
17
17
 
18
18
  def initialize(*args)
19
19
  options = args.extract_options!
20
- @_name_id = Saml::Elements::NameId.new(format: options.delete(:name_id_format),
21
- value: options.delete(:name_id))
20
+ if options[:name_id].present?
21
+ @_name_id = Saml::Elements::NameId.new(format: options.delete(:name_id_format),
22
+ value: options.delete(:name_id))
23
+ end
22
24
  @subject_confirmations = [Saml::Elements::SubjectConfirmation.new(recipient: options.delete(:recipient),
23
25
  in_response_to: options.delete(:in_response_to))]
24
26
  super(*(args << options))
25
27
  end
26
28
 
27
29
  def name_id
28
- @_name_id.value
30
+ @_name_id.try(:value)
29
31
  end
30
32
 
31
33
  def name_id=(value)
32
- @_name_id.value = value
34
+ @_name_id.value = value if @_name_id
33
35
  end
34
36
 
35
37
  def name_id_format
36
- @_name_id.format
38
+ @_name_id.try(:format)
37
39
  end
38
40
 
39
41
  def subject_confirmation
data/lib/saml/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Saml
2
- VERSION = "2.20.0"
2
+ VERSION = "2.20.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libsaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.0
4
+ version: 2.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoist Claassen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-28 00:00:00.000000000 Z
11
+ date: 2016-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport