libsaml 2.14.0 → 2.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/libsaml.rb +1 -0
- data/lib/saml/artifact.rb +1 -1
- data/lib/saml/base.rb +6 -6
- data/lib/saml/complex_types/indexed_endpoint_type.rb +1 -1
- data/lib/saml/complex_types/request_abstract_type.rb +1 -1
- data/lib/saml/complex_types/statement_abstract_type.rb +1 -1
- data/lib/saml/complex_types/status_response_type.rb +1 -1
- data/lib/saml/elements/attribute_consuming_service.rb +1 -1
- data/lib/saml/elements/attribute_query.rb +1 -1
- data/lib/saml/elements/encrypted_id.rb +2 -2
- data/lib/saml/elements/evidence.rb +1 -1
- data/lib/saml/elements/idp_sso_descriptor.rb +1 -1
- data/lib/saml/elements/requested_attribute.rb +1 -1
- data/lib/saml/version.rb +1 -1
- data/lib/saml/xml_helpers.rb +9 -3
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 067b8675cd140dfdc7b65eefba942c99dda19d49
|
4
|
+
data.tar.gz: d38738ba962dd8e98010cb75d4be3e094b0d48b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dc9d91c9f0a90ce5f784a53b41b56dfb092102c1e5b30354d3a160e459c3a2e6d2e45b8a70ddb8927e2003d5eb36ada254f02c4e0407af04dbd33f4dcf04402
|
7
|
+
data.tar.gz: 9594ae1ac0be7494e4d4458b12efedea85d5665a7adec0c554823818e3511eea3f24deaf2d3b02675b7cfbada999686a7d86698de678a54ebb21877e141fb17c
|
data/README.md
CHANGED
@@ -114,7 +114,7 @@ class SamlController < ApplicationController
|
|
114
114
|
# provider should be of type Saml::Provider
|
115
115
|
@response = Saml::Bindings::HTTPArtifact.resolve(request, provider.artifact_resolution_service_url)
|
116
116
|
elsif params["SAMLResponse"]
|
117
|
-
@response = Saml::Bindings::
|
117
|
+
@response = Saml::Bindings::HTTPPost.receive_message(request, :response)
|
118
118
|
else
|
119
119
|
# handle invalid request
|
120
120
|
end
|
data/lib/libsaml.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'saml'
|
data/lib/saml/artifact.rb
CHANGED
data/lib/saml/base.rb
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
require '
|
1
|
+
require 'xmlmapper'
|
2
2
|
|
3
3
|
module Saml
|
4
4
|
module Base
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
7
|
included do
|
8
|
-
include ::
|
8
|
+
include ::XmlMapper
|
9
9
|
include ::ActiveModel::Validations
|
10
10
|
|
11
11
|
attr_accessor :xml_value
|
12
12
|
has_xml_content
|
13
13
|
|
14
|
-
extend
|
15
|
-
include
|
14
|
+
extend XmlMapperClassMethods
|
15
|
+
include XmlMapperInstanceMethods
|
16
16
|
end
|
17
17
|
|
18
|
-
module
|
18
|
+
module XmlMapperInstanceMethods
|
19
19
|
def initialize(attributes = {})
|
20
20
|
attributes.each do |key, value|
|
21
21
|
send("#{key}=", value) if respond_to?("#{key}=") && value.present?
|
@@ -29,7 +29,7 @@ module Saml
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
module
|
32
|
+
module XmlMapperClassMethods
|
33
33
|
def parse(xml, options = {})
|
34
34
|
if xml.is_a?(String)
|
35
35
|
ActiveSupport::XmlMini_REXML.parse(xml)
|
@@ -8,7 +8,7 @@ module Saml
|
|
8
8
|
namespace "md"
|
9
9
|
|
10
10
|
attribute :index, Integer, :tag => "index"
|
11
|
-
attribute :is_default,
|
11
|
+
attribute :is_default, XmlMapper::Boolean, :tag => "isDefault"
|
12
12
|
|
13
13
|
has_many :service_names, ServiceName
|
14
14
|
has_many :service_descriptions, ServiceDescription
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Saml
|
2
2
|
module Elements
|
3
3
|
class EncryptedID
|
4
|
-
include ::
|
4
|
+
include ::XmlMapper
|
5
5
|
include ::Saml::Base
|
6
6
|
include ::Saml::XMLHelpers
|
7
7
|
|
@@ -34,7 +34,7 @@ module Saml
|
|
34
34
|
)
|
35
35
|
encrypted_key = self.encrypted_data.encrypt(name_id_xml, key_options)
|
36
36
|
encrypted_key.set_encryption_method(
|
37
|
-
algorithm: 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p',
|
37
|
+
algorithm: 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p',
|
38
38
|
digest_method_algorithm: 'http://www.w3.org/2000/09/xmldsig#sha1'
|
39
39
|
)
|
40
40
|
encrypted_key.set_key_name key_name
|
@@ -10,7 +10,7 @@ module Saml
|
|
10
10
|
|
11
11
|
tag 'IDPSSODescriptor'
|
12
12
|
|
13
|
-
attribute :want_authn_requests_signed,
|
13
|
+
attribute :want_authn_requests_signed, XmlMapper::Boolean, :tag => "WantAuthnRequestsSigned", :default => false
|
14
14
|
|
15
15
|
has_many :single_sign_on_services, SingleSignOnService
|
16
16
|
|
data/lib/saml/version.rb
CHANGED
data/lib/saml/xml_helpers.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
module Saml
|
2
3
|
module XMLHelpers
|
3
4
|
extend ActiveSupport::Concern
|
@@ -16,7 +17,12 @@ module Saml
|
|
16
17
|
write_xml = builder.nil? ? true : false
|
17
18
|
builder ||= Nokogiri::XML::Builder.new
|
18
19
|
builder.doc.encoding = "UTF-8"
|
19
|
-
result
|
20
|
+
result = if xml_value
|
21
|
+
builder << xml_value
|
22
|
+
builder
|
23
|
+
else
|
24
|
+
super(builder, default_namespace)
|
25
|
+
end
|
20
26
|
|
21
27
|
if write_xml
|
22
28
|
instruct ? result.to_xml(nokogiri_options(options)) : result.doc.root
|
@@ -43,9 +49,9 @@ module Saml
|
|
43
49
|
|
44
50
|
def nokogiri_options(options)
|
45
51
|
nokogiri_options = {
|
46
|
-
save_with: Nokogiri::XML::Node::SaveOptions::AS_XML
|
52
|
+
save_with: Nokogiri::XML::Node::SaveOptions::AS_XML
|
47
53
|
}
|
48
|
-
nokogiri_options[:save_with]
|
54
|
+
nokogiri_options[:save_with] |= Nokogiri::XML::Node::SaveOptions::FORMAT if options[:formatted]
|
49
55
|
nokogiri_options
|
50
56
|
end
|
51
57
|
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.
|
4
|
+
version: 2.15.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: 2015-11-
|
11
|
+
date: 2015-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -39,47 +39,47 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 3.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: xmlmapper
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.6.0
|
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
|
-
version: 0.
|
54
|
+
version: 0.6.0
|
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
|
-
version: 0.
|
61
|
+
version: 0.4.0
|
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
|
-
version: 0.
|
68
|
+
version: 0.4.0
|
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
|
-
version: 0.
|
75
|
+
version: 0.6.0
|
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
|
-
version: 0.
|
82
|
+
version: 0.6.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: curb
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- MIT-LICENSE
|
122
122
|
- README.md
|
123
123
|
- Rakefile
|
124
|
+
- lib/libsaml.rb
|
124
125
|
- lib/saml.rb
|
125
126
|
- lib/saml/artifact.rb
|
126
127
|
- lib/saml/artifact_resolve.rb
|