libsaml 2.0.5 → 2.0.6

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzdjMGJhZTcxYTc2MTUxMmNlMTdhNzEzNDlmOGI4ODEyZDQxMTBhNg==
4
+ OWIyNTBiNGEzODgxNmY2NjkxNzIwMmU1MzlhY2Y2Yzg2Y2U4ZmZmZg==
5
5
  data.tar.gz: !binary |-
6
- NTY3YjkxMDI3OTQyNjUyYTViZDc5MTAxZTBjYzM4ZjllOGVkYzM0Mg==
6
+ MjNkYzcwNTc0YjBjYmY4OTE3OGMxNTZhNjcwZTUyNDk1ZGVkMDQ4MA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NDcwYjA1YTZmZDcyZGVhZmVmNDlhMjhmMWQ1ZDRiNGIzNzU0YzIzMTE2Y2U5
10
- ZmUxYmUyYTBkNGVkN2ZhMTZlYjNjZjgzNjE2ZmZmOTIwMzIyNzA0MWQxMjdh
11
- M2FkY2NjODEyYjdkMTIwNzY5NzVmYmI3MmJhZTIyMzdhZTM2MTE=
9
+ Y2EwZDZmZTJhODU3NTU1N2IwY2FkYzJjNGZlYTZkZDQ1MWNjNGY4NTE0NThm
10
+ ZTcxMTk5NDUyZjZjZjI1YjgzYWU3MTk5YTc4MzQ4OTRjNDQyY2Q4YzdhMmEz
11
+ N2YyOTNhY2ViOTFiODZjMDlhYmJkYjEyYjE4Yzc5YWE1ZGI5ZWQ=
12
12
  data.tar.gz: !binary |-
13
- ODdjOTk5ZjJhZWZjMmFiN2M3NWFlYzA4N2Y3Njk2OWUxYTk3YzFmMGZjNTZj
14
- Y2YwYzcwYzI2YWM0YzNhZjc4NzE4Y2UzYTRjZjBhMzZmNjQ4NjgzNWY4NDU2
15
- Y2ZjODYxNWE4YTBkMDhmNjY5ZDJjZjQ1NGIzN2E2NzM4ZDJhNWY=
13
+ NzI2ZmJhNTk0MTZjZjBkNmY4OGIwYTFhOTBiYTU3MTJhMTA4NGJjMTU1OGZm
14
+ ZGZiNWJiYTc5NTk5ZjhiNjA4MzRjZmUxZWE4NmYwNDI1OWJlNGIxNWFiOTZm
15
+ MzQ5NDlhMmJhNWZjMTc5MGVkN2FlYTE2MGZhYTJmOWRjM2NhZDU=
@@ -133,6 +133,8 @@ module Saml
133
133
  if %w(authn_request response logout_request logout_response artifact_resolve artifact_response).include?(type.to_s)
134
134
  klass = "Saml::#{type.to_s.camelize}".constantize
135
135
  klass.parse(message, single: true)
136
+ elsif klass = type.to_s.camelize.safe_constantize
137
+ klass.parse(message, single: true)
136
138
  else
137
139
  nil
138
140
  end
@@ -25,7 +25,7 @@ module Saml
25
25
  private
26
26
 
27
27
  def parse_request_or_response(type, params)
28
- message = decode_message(params["SAMLRequest"])
28
+ message = decode_message(params["SAMLRequest"] || params["SAMLResponse"])
29
29
 
30
30
  Saml.parse_message(message, type)
31
31
  end
@@ -56,6 +56,9 @@ module Saml
56
56
 
57
57
  private
58
58
 
59
+ def param_key
60
+ request_or_response.is_a?(Saml::ComplexTypes::StatusResponseType) ? "SAMLResponse" : "SAMLRequest"
61
+ end
59
62
 
60
63
  def parse_signature_params(query)
61
64
  params = {}
@@ -65,7 +68,7 @@ module Saml
65
68
  end
66
69
 
67
70
  relay_state = params["RelayState"] ? "&RelayState=#{params['RelayState']}" : ""
68
- "SAMLRequest=#{params['SAMLRequest']}#{relay_state}&SigAlg=#{params['SigAlg']}"
71
+ "#{param_key}=#{params['SAMLRequest']}#{relay_state}&SigAlg=#{params['SigAlg']}"
69
72
  end
70
73
 
71
74
  def encoded_message
@@ -81,7 +84,7 @@ module Saml
81
84
  def params
82
85
  params = {}
83
86
 
84
- params["SAMLRequest"] = encoded_message
87
+ params[param_key] = encoded_message
85
88
  params["RelayState"] = relay_state if relay_state
86
89
  params["SigAlg"] = signature_algorithm if signature_algorithm
87
90
 
@@ -1,3 +1,3 @@
1
1
  module Saml
2
- VERSION = "2.0.5"
2
+ VERSION = "2.0.6"
3
3
  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.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoist Claassen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-12 00:00:00.000000000 Z
11
+ date: 2013-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport