Revision: 2125
Author: olavmrk
Date: Fri Jan 22 01:13:52 2010
Log: Move IdP enabled check into SimpleSAML_IdP.
http://code.google.com/p/simplesamlphp/source/detail?r=2125
Modified:
/trunk/lib/SimpleSAML/IdP.php
/trunk/www/saml2/idp/SSOService.php
/trunk/www/shib13/idp/SSOService.php
=======================================
--- /trunk/lib/SimpleSAML/IdP.php Tue Jan 5 02:18:56 2010
+++ /trunk/lib/SimpleSAML/IdP.php Fri Jan 22 01:13:52 2010
@@ -45,9 +45,17 @@
$this->id = $id;
$metadata =
SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
+ $globalConfig = SimpleSAML_Configuration::getInstance();
+
if (substr($id, 0, 6) === 'saml2:') {
+ if (!$globalConfig->getBoolean('enable.saml20-idp',
FALSE)) {
+ throw new SimpleSAML_Error_Exception('enable.saml20-idp disabled in
config.php.');
+ }
$this->config = $metadata->getMetaDataConfig(substr($id,
6), 'saml20-idp-hosted');
} elseif (substr($id, 0, 6) === 'saml1:') {
+ if (!$globalConfig->getBoolean('enable.shib13-idp',
FALSE)) {
+ throw new SimpleSAML_Error_Exception('enable.shib13-idp disabled in
config.php.');
+ }
$this->config = $metadata->getMetaDataConfig(substr($id,
6), 'shib13-idp-hosted');
} else {
assert(FALSE);
=======================================
--- /trunk/www/saml2/idp/SSOService.php Fri Jan 22 01:13:40 2010
+++ /trunk/www/saml2/idp/SSOService.php Fri Jan 22 01:13:52 2010
@@ -12,11 +12,6 @@
require_once('../../../www/_include.php');
SimpleSAML_Logger::info('SAML2.0 - IdP.SSOService: Accessing SAML 2.0 IdP
endpoint SSOService');
-
-$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');
=======================================
--- /trunk/www/shib13/idp/SSOService.php Fri Jan 22 01:13:40 2010
+++ /trunk/www/shib13/idp/SSOService.php Fri Jan 22 01:13:52 2010
@@ -12,11 +12,6 @@
require_once('../../../www/_include.php');
SimpleSAML_Logger::info('Shib1.3 - IdP.SSOService: Accessing Shibboleth
1.3 IdP endpoint SSOService');
-
-$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');
--
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en.