libsaml 2.3.2 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/saml/provider_stores/file.rb +20 -8
- data/lib/saml/version.rb +1 -1
- metadata +24 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9424bddf85fc95120f75c28f79c1f4419815c76d
|
4
|
+
data.tar.gz: 8646292651d374f123da9755f867aa9b47f3180d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be234bc73794e3ed45c5be4ad95a1af8af972e40265080448b5028504384a9866f444b9f7357af963462ba05f0ead4c6c59eaa04e1ffac3a6e587c98c53cfb6c
|
7
|
+
data.tar.gz: 9cad9ded94c17b569177c57de826fd459d18ad957ed4d34c4c59dd8559180514fb6a81060ccc215e7c7f2c8a44d4f6ef8a3b54d074af620a4ce26e92b4202e35
|
@@ -4,18 +4,30 @@ module Saml
|
|
4
4
|
attr_accessor :providers
|
5
5
|
|
6
6
|
def initialize(metadata_dir = "config/metadata", key_file = "config/ssl/key.pem")
|
7
|
-
|
8
|
-
|
9
|
-
entity_descriptor = Saml::Elements::EntityDescriptor.parse(::File.read(file), single: true)
|
10
|
-
private_key = OpenSSL::PKey::RSA.new(::File.read(key_file))
|
11
|
-
type = entity_descriptor.sp_sso_descriptor.present? ? "service_provider" : "identity_provider"
|
7
|
+
@mutex = Mutex.new
|
8
|
+
self.providers = {}
|
12
9
|
|
13
|
-
|
14
|
-
end
|
10
|
+
load_files(metadata_dir, key_file)
|
15
11
|
end
|
16
12
|
|
17
13
|
def find_by_entity_id(entity_id)
|
18
|
-
self.providers
|
14
|
+
self.providers[entity_id]
|
15
|
+
end
|
16
|
+
|
17
|
+
def load_files(metadata_dir, key_file)
|
18
|
+
Dir[::File.join(metadata_dir, "*.xml")].each do |file|
|
19
|
+
add_metadata(::File.read(file), OpenSSL::PKey::RSA.new(::File.read(key_file)))
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def add_metadata(metadata_xml, private_key = nil)
|
24
|
+
entity_descriptor = Saml::Elements::EntityDescriptor.parse(metadata_xml, single: true)
|
25
|
+
type = entity_descriptor.sp_sso_descriptor.present? ? "service_provider" : "identity_provider"
|
26
|
+
provider = BasicProvider.new(entity_descriptor, private_key, type)
|
27
|
+
|
28
|
+
@mutex.synchronize do
|
29
|
+
self.providers[provider.entity_id] = provider
|
30
|
+
end
|
19
31
|
end
|
20
32
|
end
|
21
33
|
end
|
data/lib/saml/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libsaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoist Claassen
|
@@ -14,98 +14,98 @@ dependencies:
|
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.2.15
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.2.15
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activemodel
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 3.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 3.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri-happymapper
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.5.7
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.5.7
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: xmldsig
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.2.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.2.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: xmlenc
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.1.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.1.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: curb
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: coveralls
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0.7'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.7'
|
111
111
|
description: Libsaml makes the creation of SAML 2.0 messages easy. The object structure
|
@@ -118,10 +118,6 @@ executables: []
|
|
118
118
|
extensions: []
|
119
119
|
extra_rdoc_files: []
|
120
120
|
files:
|
121
|
-
- MIT-LICENSE
|
122
|
-
- README.md
|
123
|
-
- Rakefile
|
124
|
-
- lib/saml.rb
|
125
121
|
- lib/saml/artifact.rb
|
126
122
|
- lib/saml/artifact_resolve.rb
|
127
123
|
- lib/saml/artifact_response.rb
|
@@ -158,8 +154,8 @@ files:
|
|
158
154
|
- lib/saml/elements/entity_descriptor.rb
|
159
155
|
- lib/saml/elements/idp_sso_descriptor.rb
|
160
156
|
- lib/saml/elements/key_descriptor.rb
|
161
|
-
- lib/saml/elements/key_info.rb
|
162
157
|
- lib/saml/elements/key_info/x509_data.rb
|
158
|
+
- lib/saml/elements/key_info.rb
|
163
159
|
- lib/saml/elements/md_extensions.rb
|
164
160
|
- lib/saml/elements/name_id.rb
|
165
161
|
- lib/saml/elements/organization.rb
|
@@ -171,7 +167,6 @@ files:
|
|
171
167
|
- lib/saml/elements/samlp_extensions.rb
|
172
168
|
- lib/saml/elements/service_description.rb
|
173
169
|
- lib/saml/elements/service_name.rb
|
174
|
-
- lib/saml/elements/signature.rb
|
175
170
|
- lib/saml/elements/signature/canonicalization_method.rb
|
176
171
|
- lib/saml/elements/signature/digest_method.rb
|
177
172
|
- lib/saml/elements/signature/inclusive_namespaces.rb
|
@@ -180,6 +175,7 @@ files:
|
|
180
175
|
- lib/saml/elements/signature/signed_info.rb
|
181
176
|
- lib/saml/elements/signature/transform.rb
|
182
177
|
- lib/saml/elements/signature/transforms.rb
|
178
|
+
- lib/saml/elements/signature.rb
|
183
179
|
- lib/saml/elements/sp_sso_descriptor.rb
|
184
180
|
- lib/saml/elements/status.rb
|
185
181
|
- lib/saml/elements/status_code.rb
|
@@ -201,7 +197,11 @@ files:
|
|
201
197
|
- lib/saml/util.rb
|
202
198
|
- lib/saml/version.rb
|
203
199
|
- lib/saml/xml_helpers.rb
|
200
|
+
- lib/saml.rb
|
204
201
|
- lib/tasks/saml_tasks.rake
|
202
|
+
- MIT-LICENSE
|
203
|
+
- Rakefile
|
204
|
+
- README.md
|
205
205
|
homepage: https://www.digidentity.eu
|
206
206
|
licenses:
|
207
207
|
- MIT
|
@@ -212,17 +212,17 @@ require_paths:
|
|
212
212
|
- lib
|
213
213
|
required_ruby_version: !ruby/object:Gem::Requirement
|
214
214
|
requirements:
|
215
|
-
- -
|
215
|
+
- - '>='
|
216
216
|
- !ruby/object:Gem::Version
|
217
217
|
version: '0'
|
218
218
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
|
-
- -
|
220
|
+
- - '>='
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
223
|
requirements: []
|
224
224
|
rubyforge_project:
|
225
|
-
rubygems_version: 2.
|
225
|
+
rubygems_version: 2.0.14
|
226
226
|
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: A gem to easily create SAML 2.0 messages.
|