libsaml 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04f6dac96a32dd7f02bda7921058ebc8fd319013
4
- data.tar.gz: fa9dec218ddb5b563f89070afcd863b220ce64f6
3
+ metadata.gz: 2504015222bc579e1825cb91a8494ac10a6f9de7
4
+ data.tar.gz: 6941b75d531369162d63f231449df9ad1a40b5c7
5
5
  SHA512:
6
- metadata.gz: de6902e57a8c3fca4bec943e354f81d74c717fe2ab7488e178253e03340ea672e4ed5ecb88763e1ca268688b22ac2e265b932e93e1190dcf65800a2a085f64a0
7
- data.tar.gz: 24209759a83b2322fe82fa6a06119420fc2267a1ea1f935ddf1ab6de6596b0b8c40700c3fd6de5c3a5fff26d39877c7a80fef1cb90b159ec43d2ff8621ae7636
6
+ metadata.gz: 40e7fdc415fd8c0dcf47bfce890771928e9d29041731fcb578d48867f24f44b367102f83fba41093a288f8a94fdd8129066ad3baa7c8dddae0cc263a49674ef8
7
+ data.tar.gz: 72e25b192850943f4ff413f34affa35502cc8054c94029450bf8309cc62a5a1d38dabe400a0d10d569d976e66bc4640a576a86a688a94fa8aba62bb5124c7c42
@@ -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
- before_action &block
6
+ before_filter &block
7
7
  else
8
8
  case entity_id_or_method
9
9
  when Symbol
10
- before_action { Saml.current_provider = send(entity_id_or_method) }
10
+ before_filter { Saml.current_provider = send(entity_id_or_method) }
11
11
  else
12
- before_action { Saml.current_provider = Saml.provider("#{entity_id_or_method}") }
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
- before_action { Saml.current_store = store_or_symbol }
20
+ before_filter { Saml.current_store = store_or_symbol }
21
21
  else
22
- before_action do
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
@@ -1,3 +1,3 @@
1
1
  module Saml
2
- VERSION = "2.1.2"
2
+ VERSION = "2.1.3"
3
3
  end
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.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoist Claassen