test/maestrano/saml/response_test.rb in maestrano-0.12.2 vs test/maestrano/saml/response_test.rb in maestrano-0.12.3
- old
+ new
@@ -181,11 +181,12 @@
'sso.slo_enabled' => false,
'sso.init_path' => '/mno/sso/init',
'sso.consume_path' => '/mno/sso/consume',
'sso.creation_mode' => 'real',
'sso.idm' => 'http://idp.myotherapp.com',
- 'sso.x509_fingerprint' => signature_fingerprint_1
+ 'sso.x509_fingerprint' => signature_fingerprint_1,
+ 'sso.x509_certificate' => signature_1
}
Maestrano.configure do |config|
config.environment = @config['environment']
config.app.host = @config['app.host']
@@ -208,10 +209,11 @@
config.sso.init_path = @preset_config['sso.init_path']
config.sso.consume_path = @preset_config['sso.consume_path']
config.sso.creation_mode = @preset_config['sso.creation_mode']
config.sso.x509_fingerprint = @preset_config['sso.x509_fingerprint']
+ config.sso.x509_certificate = @preset_config['sso.x509_certificate']
end
end
should "return true when using certificate instead of fingerprint" do
response = Maestrano::Saml::Response[@preset].new(response_document_4)
@@ -227,9 +229,10 @@
end
should "support dynamic namespace resolution on signature elements" do
Maestrano[@preset].configure do |config|
config.sso.x509_fingerprint = "28:74:9B:E8:1F:E8:10:9C:A8:7C:A9:C3:E3:C5:01:6C:92:1C:B4:BA"
+ config.sso.x509_certificate = nil
end
response = Maestrano::Saml::Response[@preset].new(fixture("no_signature_ns.xml"))
response.stubs(:conditions).returns(nil)
Maestrano::XMLSecurity::SignedDocument.any_instance.expects(:validate_signature).returns(true)
\ No newline at end of file