@@ -356,13 +356,16 @@ protected function _pickCachedResponse(array $cachedResponses, array $request, $
356356
357357 protected function _showWayf ($ request , $ candidateIdPs )
358358 {
359+ $ isDebugRequest = (isset ($ request [EngineBlock_Corto_XmlToArray::PRIVATE_PFX ]['Debug ' ]) &&
360+ $ request [EngineBlock_Corto_XmlToArray::PRIVATE_PFX ]['Debug ' ]);
361+
359362 // Post to the 'continueToIdp' service
360363 $ action = $ this ->_server ->getUrl ('continueToIdP ' );
361364
362365 $ requestIssuer = $ request ['saml:Issuer ' ][EngineBlock_Corto_XmlToArray::VALUE_PFX ];
363366
364367 $ remoteEntity = $ this ->_server ->getRemoteEntity ($ requestIssuer );
365- $ idpList = $ this ->_transformIdpsForWAYF ($ candidateIdPs );
368+ $ idpList = $ this ->_transformIdpsForWAYF ($ candidateIdPs, $ isDebugRequest );
366369
367370 $ output = $ this ->_server ->renderTemplate (
368371 'discover ' ,
@@ -376,7 +379,7 @@ protected function _showWayf($request, $candidateIdPs)
376379 $ this ->_server ->sendOutput ($ output );
377380 }
378381
379- protected function _transformIdpsForWayf ($ idps )
382+ protected function _transformIdpsForWayf ($ idps, $ isDebugRequest )
380383 {
381384 $ wayfIdps = array ();
382385 foreach ($ idps as $ idpEntityId ) {
@@ -423,7 +426,7 @@ protected function _transformIdpsForWayf($idps)
423426 : '/media/idp-logo-not-found.png ' ,
424427 'Keywords ' => isset ($ metadata ['Keywords ' ]['en ' ]) ? explode (' ' , $ metadata ['Keywords ' ]['en ' ])
425428 : isset ($ metadata ['Keywords ' ]['nl ' ]) ? explode (' ' , $ metadata ['Keywords ' ]['nl ' ]) : 'Undefined ' ,
426- 'Access ' => ((isset ($ metadata ['Access ' ]) && $ metadata ['Access ' ]) ? '1 ' : '0 ' ) ,
429+ 'Access ' => ((isset ($ metadata ['Access ' ]) && $ metadata ['Access ' ]) || $ isDebugRequest ) ? '1 ' : '0 ' ,
427430 'ID ' => md5 ($ idpEntityId ),
428431 'EntityId ' => $ idpEntityId ,
429432 );
0 commit comments