Revision: 1736
Author: andreassolberg
Date: Tue Sep  1 04:40:32 2009
Log: SAML auth source exposes artifact endpoints... (support beeing added  
these days...)
http://code.google.com/p/simplesamlphp/source/detail?r=1736

Modified:
  /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php
  /trunk/modules/saml/www/sp/metadata.php

=======================================
--- /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php      Tue Jun 16 02:23:14 2009
+++ /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php      Tue Sep  1 04:40:32 2009
@@ -264,8 +264,18 @@
                }

                if (array_key_exists('AssertionConsumerService', $metadata)) {
+                       $index = 0;
+                       if 
(array_key_exists('AssertionConsumerService.artifact', $metadata)) {
+                               $t = 
$this->createElement('AssertionConsumerService');
+                               $t->setAttribute('index', (string)$index);
+                                
$t->setAttribute('Binding', 
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact');
+                               $t->setAttribute('Location',  
$metadata['AssertionConsumerService.artifact']);
+                               $e->appendChild($t);
+                               $index++;
+                       }
+
                        $t = $this->createElement('AssertionConsumerService');
-                       $t->setAttribute('index', '0');
+                       $t->setAttribute('index', (string)$index);
                         
$t->setAttribute('Binding', 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST');
                        $t->setAttribute('Location', 
$metadata['AssertionConsumerService']);
                        $e->appendChild($t);
@@ -438,8 +448,19 @@
                }

                if (array_key_exists('AssertionConsumerService', $metadata)) {
+
+                       $index = 0;
+                       if 
(array_key_exists('AssertionConsumerService.artifact', $metadata)) {
+                               $t = 
$this->createElement('AssertionConsumerService');
+                               $t->setAttribute('index', (string)$index);
+                                
$t->setAttribute('Binding', 'urn:oasis:names:tc:SAML:1.0:profiles:artifact-01');
+                               $t->setAttribute('Location',  
$metadata['AssertionConsumerService.artifact']);
+                               $e->appendChild($t);
+                               $index++;
+                       }
+
                        $t = $this->createElement('AssertionConsumerService');
-                       $t->setAttribute('index', '0');
+                       $t->setAttribute('index', (string)$index);
                         
$t->setAttribute('Binding', 
'urn:oasis:names:tc:SAML:1.0:profiles:browser-post');
                        $t->setAttribute('Location', 
$metadata['AssertionConsumerService']);
                        $e->appendChild($t);
=======================================
--- /trunk/modules/saml/www/sp/metadata.php     Wed Aug 19 01:31:19 2009
+++ /trunk/modules/saml/www/sp/metadata.php     Tue Sep  1 04:40:32 2009
@@ -19,12 +19,27 @@

  $metaArray11 = array(
        'AssertionConsumerService' =>  
SimpleSAML_Module::getModuleURL('saml/sp/saml1-acs.php'),
-       );
+);
+
+$spconfig = $source->getMetadata();
+
+if ($spconfig->getBoolean('saml11.binding.artifact.enable', FALSE)) {
+       $metaArray11['AssertionConsumerService.artifact'] =  
SimpleSAML_Module::getModuleURL('saml/sp/saml1-acs.php/artifact');
+}
+
+

  $metaArray20 = array(
        'AssertionConsumerService' =>  
SimpleSAML_Module::getModuleURL('saml/sp/saml2-acs.php'),
        'SingleLogoutService' =>  
SimpleSAML_Module::getModuleURL('saml/sp/saml2-logout.php/' . $sourceId),
-       );
+);
+
+if ($spconfig->getBoolean('saml20.binding.artifact.enable', FALSE)) {
+       $metaArray20['AssertionConsumerService.artifact'] =  
SimpleSAML_Module::getModuleURL('saml/sp/saml2-acs.php/artifact');
+}
+
+
+

  $metaBuilder = new SimpleSAML_Metadata_SAMLBuilder($entityId);
  $metaBuilder->addMetadataSP11($metaArray11);

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to