Read idp_metadata_path value from CONF.saml

Instead of CONF.federation.idp_metadata_path a
CONF.saml.idp_metadata_path should be used since it's a SAML specific
parameter.

Change-Id: I524b6a67abd110b13d8a5c38cdd9031eed771af3
Closes-Bug: #1372956
This commit is contained in:
Marek Denis 2014-09-23 16:20:18 +02:00
parent bdee12607f
commit 5384b95eb1
2 changed files with 2 additions and 2 deletions

View File

@ -339,7 +339,7 @@ class SAMLMetadataV3(_ControllerBase):
member_name = 'metadata'
def get_metadata(self, context):
metadata_path = CONF.federation.idp_metadata_path
metadata_path = CONF.saml.idp_metadata_path
try:
with open(metadata_path, 'r') as metadata_handler:
metadata = metadata_handler.read()

View File

@ -2019,7 +2019,7 @@ class IdPMetadataGenerationTests(FederationTests):
self.get(self.METADATA_URL, expected_status=500)
def test_get_metadata(self):
CONF.federation.idp_metadata_path = XMLDIR + '/idp_saml2_metadata.xml'
CONF.saml.idp_metadata_path = XMLDIR + '/idp_saml2_metadata.xml'
r = self.get(self.METADATA_URL, response_content_type='text/xml',
expected_status=200)
self.assertEqual('text/xml', r.headers.get('Content-Type'))