diff --git a/www/saml2/idp/SSOService.php b/www/saml2/idp/SSOService.php index b92512caab43d13e6a928161bb4e9a4632e3eff2..6bdbcecb6a8ed1eec50dea80f0d2e8d371cc846c 100644 --- a/www/saml2/idp/SSOService.php +++ b/www/saml2/idp/SSOService.php @@ -13,26 +13,13 @@ require_once('../../../www/_include.php'); SimpleSAML_Logger::info('SAML2.0 - IdP.SSOService: Accessing SAML 2.0 IdP endpoint SSOService'); -try { - - $config = SimpleSAML_Configuration::getInstance(); - if (!$config->getBoolean('enable.saml20-idp', FALSE)) { - throw new SimpleSAML_Error_Error('NOACCESS'); - } - - $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); - $idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted'); - $idp = SimpleSAML_IdP::getById('saml2:' . $idpEntityId); - sspmod_saml_IdP_SAML2::receiveAuthnRequest($idp); - assert('FALSE'); - -} catch(SimpleSAML_Error_Error $e) { - - $e->show(); - -} catch(Exception $e) { - - $e = new SimpleSAML_Error_Error('UNHANDLEDEXCEPTION', $e); - $e->show(); - +$config = SimpleSAML_Configuration::getInstance(); +if (!$config->getBoolean('enable.saml20-idp', FALSE)) { + throw new SimpleSAML_Error_Error('NOACCESS'); } + +$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); +$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted'); +$idp = SimpleSAML_IdP::getById('saml2:' . $idpEntityId); +sspmod_saml_IdP_SAML2::receiveAuthnRequest($idp); +assert('FALSE'); diff --git a/www/shib13/idp/SSOService.php b/www/shib13/idp/SSOService.php index 14de0d1664c7ed260bbc0d3236d54db21badacba..5bc310a23d91195163a50b534e594182b3182578 100644 --- a/www/shib13/idp/SSOService.php +++ b/www/shib13/idp/SSOService.php @@ -13,25 +13,13 @@ require_once('../../../www/_include.php'); SimpleSAML_Logger::info('Shib1.3 - IdP.SSOService: Accessing Shibboleth 1.3 IdP endpoint SSOService'); -try { - $config = SimpleSAML_Configuration::getInstance(); - if (!$config->getBoolean('enable.shib13-idp', FALSE)) { - throw new SimpleSAML_Error_Error('NOACCESS'); - } - - $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); - $idpEntityId = $metadata->getMetaDataCurrentEntityID('shib13-idp-hosted'); - $idp = SimpleSAML_IdP::getById('saml1:' . $idpEntityId); - sspmod_saml_IdP_SAML1::receiveAuthnRequest($idp); - assert('FALSE'); - -} catch(SimpleSAML_Error_Error $e) { - - $e->show(); - -} catch(Exception $e) { - - $e = new SimpleSAML_Error_Error('UNHANDLEDEXCEPTION', $e); - $e->show(); - +$config = SimpleSAML_Configuration::getInstance(); +if (!$config->getBoolean('enable.shib13-idp', FALSE)) { + throw new SimpleSAML_Error_Error('NOACCESS'); } + +$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); +$idpEntityId = $metadata->getMetaDataCurrentEntityID('shib13-idp-hosted'); +$idp = SimpleSAML_IdP::getById('saml1:' . $idpEntityId); +sspmod_saml_IdP_SAML1::receiveAuthnRequest($idp); +assert('FALSE');