Skip to content
Snippets Groups Projects
Commit 3c2db394 authored by Olav Morken's avatar Olav Morken
Browse files

Metadata/SAMLParser: Only issue a warning for unsupported entities.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1465 44740490-163a-0410-bde0-09ae8108e29a
parent 773fa85a
No related branches found
No related tags found
No related merge requests found
...@@ -472,12 +472,12 @@ class SimpleSAML_Metadata_SAMLParser { ...@@ -472,12 +472,12 @@ class SimpleSAML_Metadata_SAMLParser {
/* Find the assertion consumer service endpoint. */ /* Find the assertion consumer service endpoint. */
$acs = $this->getDefaultEndpoint($spd['assertionConsumerServices'], array(self::SAML_1X_POST_BINDING)); $acs = $this->getDefaultEndpoint($spd['assertionConsumerServices'], array(self::SAML_1X_POST_BINDING));
if($acs === NULL) { if($acs === NULL) {
throw new Exception('Could not find any valid AssertionConsumerService.' . SimpleSAML_Logger::warning('Could not find a supported SAML 1.x AssertionConsumerService endpoint for ' .
' simpleSAMLphp currently supports only the browser-post binding for SAML 1.x.'); var_export($ret['entityid'], TRUE) . '.');
} else {
$ret['AssertionConsumerService'] = $acs['location'];
} }
$ret['AssertionConsumerService'] = $acs['location'];
/* Add certificate data. Only the first valid certificate will be added. */ /* Add certificate data. Only the first valid certificate will be added. */
foreach($spd['keys'] as $key) { foreach($spd['keys'] as $key) {
if($key['type'] !== 'X509Certificate') { if($key['type'] !== 'X509Certificate') {
...@@ -534,9 +534,11 @@ class SimpleSAML_Metadata_SAMLParser { ...@@ -534,9 +534,11 @@ class SimpleSAML_Metadata_SAMLParser {
/* Find the SSO service endpoint. */ /* Find the SSO service endpoint. */
$sso = $this->getDefaultEndpoint($idp['singleSignOnServices'], array(self::SAML_1x_AUTHN_REQUEST)); $sso = $this->getDefaultEndpoint($idp['singleSignOnServices'], array(self::SAML_1x_AUTHN_REQUEST));
if($sso === NULL) { if($sso === NULL) {
throw new Exception('Could not find any valid SingleSignOnService endpoint.'); SimpleSAML_Logger::warning('Could not find a supported SAML 1.x SingleSignOnService endpoint for ' .
var_export($ret['entityid'], TRUE) . '.');
} else {
$ret['SingleSignOnService'] = $sso['location'];
} }
$ret['SingleSignOnService'] = $sso['location'];
/* Add certificate to metadata. Only the first valid certificate will be added. */ /* Add certificate to metadata. Only the first valid certificate will be added. */
$ret['certFingerprint'] = array(); $ret['certFingerprint'] = array();
...@@ -598,12 +600,12 @@ class SimpleSAML_Metadata_SAMLParser { ...@@ -598,12 +600,12 @@ class SimpleSAML_Metadata_SAMLParser {
/* Find the assertion consumer service endpoint. */ /* Find the assertion consumer service endpoint. */
$acs = $this->getDefaultEndpoint($spd['assertionConsumerServices'], array(self::SAML_20_POST_BINDING)); $acs = $this->getDefaultEndpoint($spd['assertionConsumerServices'], array(self::SAML_20_POST_BINDING));
if($acs === NULL) { if($acs === NULL) {
throw new Exception('Could not find any valid AssertionConsumerService.' . SimpleSAML_Logger::warning('Could not find a supported SAML 2.0 AssertionConsumerService endpoint for ' .
' simpleSAMLphp currently supports only the http-post binding for SAML 2.0 assertions.'); var_export($ret['entityid'], TRUE) . '.');
} else {
$ret['AssertionConsumerService'] = $acs['location'];
} }
$ret['AssertionConsumerService'] = $acs['location'];
/* Find the single logout service endpoint. */ /* Find the single logout service endpoint. */
$slo = $this->getDefaultEndpoint($spd['singleLogoutServices'], array(self::SAML_20_REDIRECT_BINDING)); $slo = $this->getDefaultEndpoint($spd['singleLogoutServices'], array(self::SAML_20_REDIRECT_BINDING));
...@@ -694,9 +696,11 @@ class SimpleSAML_Metadata_SAMLParser { ...@@ -694,9 +696,11 @@ class SimpleSAML_Metadata_SAMLParser {
/* Find the SSO service endpoint. */ /* Find the SSO service endpoint. */
$sso = $this->getDefaultEndpoint($idp['singleSignOnServices'], array(self::SAML_20_REDIRECT_BINDING)); $sso = $this->getDefaultEndpoint($idp['singleSignOnServices'], array(self::SAML_20_REDIRECT_BINDING));
if($sso === NULL) { if($sso === NULL) {
throw new Exception('Could not find any valid SingleSignOnService endpoint.'); SimpleSAML_Logger::warning('Could not find a supported SAML 2.0 SingleSignOnService endpoint for ' .
var_export($ret['entityid'], TRUE) . '.');
} else {
$ret['SingleSignOnService'] = $sso['location'];
} }
$ret['SingleSignOnService'] = $sso['location'];
/* Find the single logout service endpoint. */ /* Find the single logout service endpoint. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment