Revision: 1797
Author: olavmrk
Date: Tue Sep 29 04:11:49 2009
Log: saml: Add NameIDPolicy option which replaces the NameIDFormat option.
http://code.google.com/p/simplesamlphp/source/detail?r=1797
Modified:
/trunk/modules/saml2/lib/Message.php
=======================================
--- /trunk/modules/saml2/lib/Message.php Tue Aug 18 23:16:05 2009
+++ /trunk/modules/saml2/lib/Message.php Tue Sep 29 04:11:49 2009
@@ -347,10 +347,18 @@
$ar = new SAML2_AuthnRequest();
- $ar->setNameIdPolicy(array(
- 'Format' => $spMetadata->getString('NameIDFormat',
SAML2_Const::NAMEID_TRANSIENT),
- 'AllowCreate' => TRUE,
+ if ($spMetadata->hasValue('NameIDPolicy')) {
+ $nameIdPolicy = $spMetadata->getString('NameIDPolicy',
NULL);
+ } else {
+ $nameIdPolicy = $spMetadata->getString('NameIDFormat',
SAML2_Const::NAMEID_TRANSIENT);
+ }
+
+ if ($nameIdPolicy !== NULL) {
+ $ar->setNameIdPolicy(array(
+ 'Format' => $nameIdPolicy,
+ 'AllowCreate' => TRUE,
));
+ }
$ar->setIssuer($spMetadata->getString('entityid'));
$ar->setDestination($idpMetadata->getString('SingleSignOnService'));
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---