22
33[ ![ Build Status] ( https://api.travis-ci.org/onelogin/php-saml.png?branch=master )] ( http://travis-ci.org/onelogin/php-saml ) [ ![ Coverage Status] ( https://coveralls.io/repos/onelogin/php-saml/badge.png )] ( https://coveralls.io/r/onelogin/php-saml ) [ ![ License] ( https://poser.pugx.org/onelogin/php-saml/license.png )] ( https://packagist.org/packages/onelogin/php-saml )
44
5- Add SAML support to your PHP softwares using this library.
6- Forget those complicated libraries and use that open source library provided
5+ Add SAML support to your PHP software using this library.
6+ Forget those complicated libraries and use this open source library provided
77and supported by OneLogin Inc.
88
99
@@ -688,7 +688,7 @@ unset($_SESSION['AuthNRequestID']);
688688$errors = $auth->getErrors();
689689
690690if (!empty($errors)) {
691- print_r( '<p >'. implode(', ', $errors). '</p >') ;
691+ echo '<p >' . implode(', ', $errors) . '</p >';
692692 exit();
693693}
694694
@@ -712,8 +712,8 @@ $nameId = $_SESSION['samlNameId'];
712712echo '<h1 >Identified user: '. htmlentities($nameId) .'</h1 >';
713713
714714if (!empty($attributes)) {
715- echo '<h2 >'. _('User attributes:'). '</h2 >';
716- echo '<table ><thead ><th >'. _('Name'). '</th ><th >'. _('Values'). '</th ></thead ><tbody >';
715+ echo '<h2 >' . _('User attributes:') . '</h2 >';
716+ echo '<table ><thead ><th >' . _('Name') . '</th ><th >' . _('Values') . '</th ></thead ><tbody >';
717717 foreach ($attributes as $attributeName => $attributeValues) {
718718 echo '<tr ><td >' . htmlentities($attributeName) . '</td ><td ><ul >';
719719 foreach ($attributeValues as $attributeValue) {
@@ -827,9 +827,9 @@ $auth->processSLO(false, $requestID);
827827$errors = $auth->getErrors();
828828
829829if (empty($errors)) {
830- print_r( 'Sucessfully logged out') ;
830+ echo 'Sucessfully logged out';
831831} else {
832- print_r( implode(', ', $errors) );
832+ echo implode(', ', $errors);
833833}
834834```
835835
@@ -971,7 +971,7 @@ if (isset($_SESSION['samlNameIdFormat'])) {
971971 $nameIdFormat = $_SESSION['samlNameIdFormat'];
972972}
973973$auth->logout($returnTo, $paramters, $nameId, $sessionIndex, false, $nameIdFormat);
974- ```
974+ ```
975975
976976If 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.
977977
@@ -999,8 +999,7 @@ session_start(); // Initialize the session, we do that because
999999 // Note that processResponse and processSLO
10001000 // methods could manipulate/close that session
10011001
1002- require_once dirname(dirname(__FILE__)).'/_toolkit_loader.php'; // Load Saml2 and
1003- // external libs
1002+ require_once dirname(__DIR__) . '/_toolkit_loader.php'; // Load Saml2 and xmlseclibs
10041003require_once 'settings.php'; // Load the setting info as an Array
10051004
10061005$auth = new OneLogin_Saml2_Auth($settingsInfo); // Initialize the SP SAML instance
@@ -1021,11 +1020,11 @@ if (isset($_GET['sso'])) { // SSO action. Will send an AuthNRequest to the I
10211020 // that could took place during the process
10221021
10231022 if (!empty($errors)) {
1024- print_r( '<p >'. implode(', ', $errors). '</p >') ;
1023+ echo '<p >' . implode(', ', $errors) . '</p >';
10251024 }
10261025 // This check if the response was
10271026 if (!$auth->isAuthenticated()) { // sucessfully validated and the user
1028- echo " <p >Not authenticated</p >" ; // data retrieved or not
1027+ echo ' <p >Not authenticated</p >' ; // data retrieved or not
10291028 exit();
10301029 }
10311030
@@ -1037,9 +1036,9 @@ if (isset($_GET['sso'])) { // SSO action. Will send an AuthNRequest to the I
10371036 $auth->processSLO(); // Process the Logout Request & Logout Response
10381037 $errors = $auth->getErrors(); // Retrieves possible validation errors
10391038 if (empty($errors)) {
1040- print_r( '<p >Sucessfully logged out</p >') ;
1039+ echo '<p >Sucessfully logged out</p >';
10411040 } else {
1042- print_r( '<p >'. implode(', ', $errors). '</p >') ;
1041+ echo '<p >' . implode(', ', $errors) . '</p >';
10431042 }
10441043}
10451044
0 commit comments