ruby-saml-mod 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d57c5f439e27b14820e79e77ce791f2011100a90
4
- data.tar.gz: bf3028731541299c9d3553cbc5b613a5be435020
3
+ metadata.gz: dbd19eaeca1ad0380954f734734c8fa724e8870a
4
+ data.tar.gz: cc1752d1cb94e9c1171a936237f5ba793fce9362
5
5
  SHA512:
6
- metadata.gz: '09cccef0a51735915597d450b258b7bf41abb686d1e5a4f40df5a17a62df192cf7b86c1663ff27ef482ac6ca1544fa53f13d49fd51930f3e9fff4a5b8d8881ca'
7
- data.tar.gz: 45db1ce0200c6d08e776caa3321498d672475570530e89113195c55680f2ce9c662a308220be32395385b509e87b134513b7bd5c0e62e6786635ecbf08efcd45
6
+ metadata.gz: ec88a7a0d7c21753e00307871f250c774a096d196e7ef1f00c4bb1af0cfd2f5d707b7f78515b21ec29effa3afce196063e6ab3c22eb78714b48a33e7c18e5cb5
7
+ data.tar.gz: 682856dbbb4741cf6121bc6cdd790690c3dd96bea16796ad1348c3e24f9777a15e0fb8c09df92cd5c09f38349f0a8177fb430647356fbd7df7aae19c85ed5923
@@ -6,7 +6,7 @@ module Onelogin::Saml
6
6
  attr_reader :name_id, :name_identifier_format, :name_qualifier, :sp_name_qualifier, :session_index, :saml_attributes
7
7
  attr_reader :status_code, :status_message
8
8
  attr_reader :in_response_to, :destination, :issuer
9
- attr_reader :validation_error
9
+ attr_reader :validation_error, :used_key
10
10
 
11
11
  def initialize(response, settings=nil)
12
12
  @response = response
@@ -60,6 +60,7 @@ module Onelogin::Saml
60
60
  @decrypted_document ||= document.clone.tap do |doc|
61
61
  doc.extend(XMLSecurity::SignedDocument)
62
62
  doc.decrypt!(settings)
63
+ @used_key = doc.used_key
63
64
  end
64
65
  end
65
66
 
data/lib/xml_sec.rb CHANGED
@@ -304,7 +304,7 @@ module XMLSecurity
304
304
  end
305
305
 
306
306
  module SignedDocument
307
- attr_reader :validation_error
307
+ attr_reader :validation_error, :used_key
308
308
 
309
309
  def self.format_cert(cert)
310
310
  # re-encode the certificate in the proper format
@@ -435,7 +435,10 @@ module XMLSecurity
435
435
  def decrypt_node(settings, xmlstr)
436
436
  settings.all_private_keys.each do |key|
437
437
  result = xmlsec_decrypt(xmlstr, key)
438
- return result if result
438
+ if result
439
+ @used_key = key
440
+ return result
441
+ end
439
442
  end
440
443
  nil
441
444
  end
@@ -15,6 +15,7 @@ describe Onelogin::Saml::Response do
15
15
  @response = Onelogin::Saml::Response.new(@xmlb64, @settings)
16
16
  @response.should be_is_valid
17
17
 
18
+ @response.used_key.should == fixture_path("test1-key.pem")
18
19
  @response.name_id.should == "zach@zwily.com"
19
20
  @response.name_qualifier.should == "http://saml.example.com:8080/opensso"
20
21
  @response.session_index.should == "s2c57ee92b5ca08e93d751987d591c58acc68d2501"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-saml-mod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - OneLogin LLC
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2017-03-27 00:00:00.000000000 Z
17
+ date: 2017-04-04 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: nokogiri