@@ -726,7 +726,7 @@ unset($_SESSION['AuthNRequestID']);
726726$errors = $auth->getErrors();
727727
728728if (!empty($errors)) {
729- print_r( '<p >'. implode(', ', $errors). '</p >') ;
729+ echo '<p >', implode(', ', $errors), '</p >';
730730 exit();
731731}
732732
@@ -865,9 +865,9 @@ $auth->processSLO(false, $requestID);
865865$errors = $auth->getErrors();
866866
867867if (empty($errors)) {
868- print_r( 'Sucessfully logged out') ;
868+ echo 'Sucessfully logged out';
869869} else {
870- print_r( implode(', ', $errors) );
870+ echo implode(', ', $errors);
871871}
872872```
873873
@@ -1009,7 +1009,7 @@ if (isset($_SESSION['samlNameIdFormat'])) {
10091009 $nameIdFormat = $_SESSION['samlNameIdFormat'];
10101010}
10111011$auth->logout($returnTo, $paramters, $nameId, $sessionIndex, false, $nameIdFormat);
1012- ```
1012+ ```
10131013
10141014If a match on the future LogoutResponse ID and the LogoutRequest ID to be sent is required, that LogoutRequest ID must to be extracted and stored.
10151015
@@ -1037,8 +1037,7 @@ session_start(); // Initialize the session, we do that because
10371037 // Note that processResponse and processSLO
10381038 // methods could manipulate/close that session
10391039
1040- require_once dirname(dirname(__FILE__)).'/_toolkit_loader.php'; // Load Saml2 and
1041- // external libs
1040+ require_once dirname(__DIR__).'/_toolkit_loader.php'; // Load Saml2 and external libs
10421041require_once 'settings.php'; // Load the setting info as an Array
10431042
10441043$auth = new OneLogin_Saml2_Auth($settingsInfo); // Initialize the SP SAML instance
@@ -1059,7 +1058,7 @@ if (isset($_GET['sso'])) { // SSO action. Will send an AuthNRequest to the I
10591058 // that could took place during the process
10601059
10611060 if (!empty($errors)) {
1062- print_r( '<p >'. implode(', ', $errors). '</p >') ;
1061+ echo '<p >', implode(', ', $errors), '</p >';
10631062 }
10641063 // This check if the response was
10651064 if (!$auth->isAuthenticated()) { // sucessfully validated and the user
@@ -1075,9 +1074,9 @@ if (isset($_GET['sso'])) { // SSO action. Will send an AuthNRequest to the I
10751074 $auth->processSLO(); // Process the Logout Request & Logout Response
10761075 $errors = $auth->getErrors(); // Retrieves possible validation errors
10771076 if (empty($errors)) {
1078- print_r( '<p >Sucessfully logged out</p >') ;
1077+ echo '<p >Sucessfully logged out</p >';
10791078 } else {
1080- print_r( '<p >'. implode(', ', $errors). '</p >') ;
1079+ echo '<p >', implode(', ', $errors), '</p >';
10811080 }
10821081}
10831082
0 commit comments