libsaml 2.1.2 → 2.1.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/bindings/soap.rb +4 -1
- data/lib/saml/rails/controller_helper.rb +5 -5
- data/lib/saml/util.rb +2 -1
- data/lib/saml/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2504015222bc579e1825cb91a8494ac10a6f9de7
|
4
|
+
data.tar.gz: 6941b75d531369162d63f231449df9ad1a40b5c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40e7fdc415fd8c0dcf47bfce890771928e9d29041731fcb578d48867f24f44b367102f83fba41093a288f8a94fdd8129066ad3baa7c8dddae0cc263a49674ef8
|
7
|
+
data.tar.gz: 72e25b192850943f4ff413f34affa35502cc8054c94029450bf8309cc62a5a1d38dabe400a0d10d569d976e66bc4640a576a86a688a94fa8aba62bb5124c7c42
|
data/lib/saml/bindings/soap.rb
CHANGED
@@ -2,6 +2,9 @@ module Saml
|
|
2
2
|
module Bindings
|
3
3
|
class SOAP
|
4
4
|
class << self
|
5
|
+
|
6
|
+
SOAP_ACTION = 'http://www.oasis-open.org/committees/security'
|
7
|
+
|
5
8
|
def create_response_xml(response)
|
6
9
|
Saml::Util.sign_xml(response, :soap)
|
7
10
|
end
|
@@ -9,7 +12,7 @@ module Saml
|
|
9
12
|
def post_message(message, response_type)
|
10
13
|
signed_message = Saml::Util.sign_xml(message, :soap)
|
11
14
|
|
12
|
-
http_response = Saml::Util.post(message.destination, signed_message)
|
15
|
+
http_response = Saml::Util.post(message.destination, signed_message, { 'SOAPAction' => SOAP_ACTION } )
|
13
16
|
|
14
17
|
if http_response.code == 200
|
15
18
|
response = Saml.parse_message(http_response.body, response_type)
|
@@ -3,13 +3,13 @@ module Saml
|
|
3
3
|
module ControllerHelper
|
4
4
|
def current_provider(entity_id_or_method = nil, &block)
|
5
5
|
if block_given?
|
6
|
-
|
6
|
+
before_filter &block
|
7
7
|
else
|
8
8
|
case entity_id_or_method
|
9
9
|
when Symbol
|
10
|
-
|
10
|
+
before_filter { Saml.current_provider = send(entity_id_or_method) }
|
11
11
|
else
|
12
|
-
|
12
|
+
before_filter { Saml.current_provider = Saml.provider("#{entity_id_or_method}") }
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -17,9 +17,9 @@ module Saml
|
|
17
17
|
def current_store(store_or_symbol = nil)
|
18
18
|
case store_or_symbol
|
19
19
|
when Symbol
|
20
|
-
|
20
|
+
before_filter { Saml.current_store = store_or_symbol }
|
21
21
|
else
|
22
|
-
|
22
|
+
before_filter do
|
23
23
|
Saml::Config.register_store klass.name.underscore, klass_or_symbol
|
24
24
|
Saml.current_store = klass.name.underscore
|
25
25
|
end
|
data/lib/saml/util.rb
CHANGED
@@ -14,10 +14,11 @@ module Saml
|
|
14
14
|
params
|
15
15
|
end
|
16
16
|
|
17
|
-
def post(location, message)
|
17
|
+
def post(location, message, additional_headers = {})
|
18
18
|
request = HTTPI::Request.new
|
19
19
|
|
20
20
|
request.url = location
|
21
|
+
request.headers.merge! additional_headers
|
21
22
|
request.headers['Content-Type'] = 'text/xml'
|
22
23
|
request.body = message
|
23
24
|
request.auth.ssl.cert_file = Saml::Config.ssl_certificate_file
|
data/lib/saml/version.rb
CHANGED