libsaml 2.21.3 → 2.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/saml/util.rb +16 -1
- data/lib/saml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10eebd806d0ef296de80f6c85761a72997c9968b
|
4
|
+
data.tar.gz: d8c01889808b0ea5a780aa2a744883917ccfc448
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66421bf62af62c9c2cf09e5a3c1fb31ae5067251af44dfa9dbc0cd07cdd4ff4d83f1de61e1f6015c33ee846c31f30b8ebd966f2546bde02e03f492ec17e8fe26
|
7
|
+
data.tar.gz: a54e585a408e5bf1032db290882c3a5ee96eb1ada9a0c97241b6eaaa73b90c20d5467fa3109daf98507140e886cca6e9d8ccd0ca476e5854cbcecaca8fcbb6b4
|
data/README.md
CHANGED
@@ -98,11 +98,11 @@ class SamlController < ApplicationController
|
|
98
98
|
|
99
99
|
def request_authentication
|
100
100
|
provider = Saml.provider("my:very:original:entityid")
|
101
|
-
destination = provider.single_sign_on_service_url(Saml::
|
101
|
+
destination = provider.single_sign_on_service_url(Saml::ProtocolBinding::HTTP_POST)
|
102
102
|
|
103
103
|
authn_request = Saml::AuthnRequest.new(:destination => destination)
|
104
104
|
|
105
|
-
session[:authn_request_id] =
|
105
|
+
session[:authn_request_id] = authn_request._id
|
106
106
|
|
107
107
|
@saml_attributes = Saml::Bindings::HTTPPost.create_form_attributes(authn_request)
|
108
108
|
|
@@ -195,7 +195,7 @@ class SamlController < ActionController::Base
|
|
195
195
|
# render an auto submit form with hidden fields set in the attributes hash
|
196
196
|
@attribute = Saml::Bindings::HTTPPost.create_form_attributes(response, relay_state: session[:saml_request][:relay_state])
|
197
197
|
else
|
198
|
-
# handle
|
198
|
+
# handle unsupported binding
|
199
199
|
end
|
200
200
|
end
|
201
201
|
|
data/lib/saml/util.rb
CHANGED
@@ -32,10 +32,25 @@ module Saml
|
|
32
32
|
http.request(request)
|
33
33
|
end
|
34
34
|
|
35
|
-
def sign_xml(message, format = :xml, &block)
|
35
|
+
def sign_xml(message, format = :xml, include_nested_prefixlist = false, &block)
|
36
36
|
message.add_signature
|
37
37
|
|
38
38
|
document = Xmldsig::SignedDocument.new(message.send("to_#{format}"))
|
39
|
+
|
40
|
+
if include_nested_prefixlist
|
41
|
+
document.signatures.reverse.each_with_object([]) do |signature, nested_prefixlist|
|
42
|
+
inclusive_namespaces = signature.signature.at_xpath('descendant::ec:InclusiveNamespaces', Xmldsig::NAMESPACES)
|
43
|
+
|
44
|
+
if inclusive_namespaces
|
45
|
+
nested_prefixlist.concat(inclusive_namespaces.get_attribute('PrefixList').to_s.split(' '))
|
46
|
+
|
47
|
+
if signature.unsigned?
|
48
|
+
inclusive_namespaces.set_attribute('PrefixList', nested_prefixlist.uniq.join(' '))
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
39
54
|
if block_given?
|
40
55
|
document.sign(&block)
|
41
56
|
else
|
data/lib/saml/version.rb
CHANGED
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.22.0
|
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-
|
11
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|