Revision: 1942
Author: olavmrk
Date: Wed Nov 4 05:51:24 2009
Log: shib13/idp/SSOService.php: Use getMetadataConfig for SP metadata.
http://code.google.com/p/simplesamlphp/source/detail?r=1942
Modified:
/trunk/www/shib13/idp/SSOService.php
=======================================
--- /trunk/www/shib13/idp/SSOService.php Tue Aug 18 23:15:14 2009
+++ /trunk/www/shib13/idp/SSOService.php Wed Nov 4 05:51:24 2009
@@ -104,7 +104,7 @@
/* Make sure that the issuer is a valid SP. */
try {
- $spmetadata =
$metadata->getMetaData($requestcache['Issuer'], 'shib13-sp-remote');
+ $spMetadata =
$metadata->getMetaDataConfig($requestcache['Issuer'], 'shib13-sp-remote');
} catch (Exception $exception) {
SimpleSAML_Utilities::fatalError($session->getTrackID(), 'PROCESSAUTHNREQUEST',
$exception);
}
@@ -140,7 +140,7 @@
if($authSource) {
/* Authenticate with an AuthSource. */
$hints = array(
- 'SPMetadata' => $spmetadata,
+ 'SPMetadata' => $spMetadata->toArray(),
'IdPMetadata' => $idpmetadata,
);
@@ -161,15 +161,14 @@
* service.
*/
try {
- $spmetadata =
$metadata->getMetaData($requestcache['Issuer'], 'shib13-sp-remote');
/* Validate the Shire the response should be sent to. */
$shire = $requestcache['shire'];
- if (!array_key_exists('AssertionConsumerService', $spmetadata)) {
+ if (!$spMetadata->hasValue('AssertionConsumerService')) {
throw new Exception('Could not find [AssertionConsumerService]
in Shib
1.3 Service Provider remote metadata.');
}
$foundACS = FALSE;
- foreach
(SimpleSAML_Utilities::arrayize($spmetadata['AssertionConsumerService']) as
$acs) {
+ foreach ($spMetadata->getArrayizeString('AssertionConsumerService') as
$acs) {
if ($acs === $shire) {
SimpleSAML_Logger::info('Shib1.3 - IdP.SSOService:
Found
AssertionConsumerService: '. $acs);
$foundACS = TRUE;
@@ -178,7 +177,7 @@
}
if (!$foundACS) {
throw new Exception('Invalid AssertionConsumerService for SP ' .
- var_export($spmetadata['entityid'], TRUE) . ': ' .
var_export($shire,
TRUE));
+ var_export($spMetadata->getString('entityid'), TRUE) .
': ' .
var_export($shire, TRUE));
}
$attributes = $session->getAttributes();
@@ -186,13 +185,13 @@
/* Authentication processing operations. */
if (!isset($authProcState)) {
/* Not processed. */
- $pc = new SimpleSAML_Auth_ProcessingChain($idpmetadata,
$spmetadata, 'idp');
+ $pc = new SimpleSAML_Auth_ProcessingChain($idpmetadata,
$spMetadata->toArray(), 'idp');
$authProcState = array(
'core:shib13-idp:requestcache' => $requestcache,
'ReturnURL' => SimpleSAML_Utilities::selfURLNoQuery(),
'Attributes' => $attributes,
- 'Destination' => $spmetadata,
+ 'Destination' => $spMetadata->toArray(),
'Source' => $idpmetadata,
);
@@ -203,10 +202,10 @@
/* Generate and send response. */
$ar = new SimpleSAML_XML_Shib13_AuthnResponse();
- $authnResponseXML = $ar->generate($idpmetadata, $spmetadata, $shire,
$attributes);
+ $authnResponseXML = $ar->generate($idpmetadata, $spMetadata->toArray(),
$shire, $attributes);
$httppost = new SimpleSAML_Bindings_Shib13_HTTPPost($config, $metadata);
- $httppost->sendResponse($authnResponseXML, $idpmetadata, $spmetadata,
$requestcache['RelayState'], $shire);
+ $httppost->sendResponse($authnResponseXML, $idpmetadata,
$spMetadata->toArray(), $requestcache['RelayState'], $shire);
} catch(Exception $exception) {
SimpleSAML_Utilities::fatalError($session->getTrackID(),
'GENERATEAUTHNRESPONSE',
$exception);
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---