saml-kit 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml/kit/builders/assertion.rb +3 -2
- data/lib/saml/kit/builders/response.rb +3 -3
- data/lib/saml/kit/metadata.rb +3 -1
- data/lib/saml/kit/response.rb +0 -2
- data/lib/saml/kit/version.rb +1 -1
- data/lib/saml/kit/xml_templatable.rb +2 -1
- data/saml-kit.gemspec +1 -1
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa485135c5f5f05fd68485afd0c7b7d6632f2614ec563bdc01da7dd4f28f17f9
|
4
|
+
data.tar.gz: 25cb0b089d88668ba9164375f0f7b79912cfdd8fea2f62a6ecb0a8c125758fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3cceecfd6d9b921903a6ea7e3a010742fe9d2447aa2ca384d31af280ec372650025272d58f111ff7c0025578540e4af49ac685f0d079cc7d6d37e72093cdc6b
|
7
|
+
data.tar.gz: a6a4dfe4d470bd57fd901aaced1a465682bbbb0b53002c21d4d10bac89f6821cc2b31c09abceeaf227b344baff7c33c12bfd4b0d0a75c362919c988fcd1cc94b
|
@@ -6,10 +6,11 @@ module Saml
|
|
6
6
|
include XmlTemplatable
|
7
7
|
extend Forwardable
|
8
8
|
|
9
|
-
def_delegators :@response_builder, :
|
9
|
+
def_delegators :@response_builder, :request, :issuer, :reference_id, :now, :configuration, :user, :version, :destination
|
10
10
|
|
11
|
-
def initialize(response_builder)
|
11
|
+
def initialize(response_builder, embed_signature)
|
12
12
|
@response_builder = response_builder
|
13
|
+
self.embed_signature = embed_signature
|
13
14
|
end
|
14
15
|
|
15
16
|
def name_id_format
|
@@ -35,12 +35,10 @@ module Saml
|
|
35
35
|
nil
|
36
36
|
end
|
37
37
|
|
38
|
-
private
|
39
|
-
|
40
38
|
def assertion
|
41
39
|
@assertion ||=
|
42
40
|
begin
|
43
|
-
assertion = Saml::Kit::Builders::Assertion.new(self)
|
41
|
+
assertion = Saml::Kit::Builders::Assertion.new(self, embed_signature)
|
44
42
|
if encrypt
|
45
43
|
Saml::Kit::Builders::EncryptedAssertion.new(self, assertion)
|
46
44
|
else
|
@@ -49,6 +47,8 @@ module Saml
|
|
49
47
|
end
|
50
48
|
end
|
51
49
|
|
50
|
+
private
|
51
|
+
|
52
52
|
def response_options
|
53
53
|
{
|
54
54
|
ID: id,
|
data/lib/saml/kit/metadata.rb
CHANGED
@@ -77,7 +77,9 @@ module Saml
|
|
77
77
|
def certificates
|
78
78
|
@certificates ||= document.find_all("/md:EntityDescriptor/md:#{name}/md:KeyDescriptor").map do |item|
|
79
79
|
cert = item.at_xpath("./ds:KeyInfo/ds:X509Data/ds:X509Certificate", NAMESPACES).text
|
80
|
-
|
80
|
+
attribute = item.attribute('use')
|
81
|
+
use = attribute.nil? ? nil : item.attribute('use').value
|
82
|
+
::Xml::Kit::Certificate.new(cert, use: use)
|
81
83
|
end
|
82
84
|
end
|
83
85
|
|
data/lib/saml/kit/response.rb
CHANGED
data/lib/saml/kit/version.rb
CHANGED
@@ -12,7 +12,8 @@ module Saml
|
|
12
12
|
# Returns true if an embedded signature is requested and at least one signing certificate is available via the configuration.
|
13
13
|
def sign?
|
14
14
|
return configuration.sign? if embed_signature.nil?
|
15
|
-
embed_signature && configuration.sign?
|
15
|
+
(embed_signature && configuration.sign?) ||
|
16
|
+
(embed_signature && @signing_key_pair.present?)
|
16
17
|
end
|
17
18
|
|
18
19
|
def digest_method
|
data/saml-kit.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
26
|
spec.add_dependency "activemodel", ">= 4.2.0"
|
27
|
-
spec.add_dependency "xml-kit", "
|
27
|
+
spec.add_dependency "xml-kit", ">= 0.1.5", "<= 1.0.0"
|
28
28
|
spec.add_development_dependency "bundler", "~> 1.15"
|
29
29
|
spec.add_development_dependency "ffaker", "~> 2.7"
|
30
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
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.
|
4
|
+
version: 1.0.3
|
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-02-
|
11
|
+
date: 2018-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: xml-kit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.5
|
34
|
+
- - "<="
|
32
35
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
36
|
+
version: 1.0.0
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.1.5
|
44
|
+
- - "<="
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
46
|
+
version: 1.0.0
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: bundler
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|