Skip to content

Commit

Permalink
Fix SAML-Toolkits#32. Minor bug reported by Max-Kolodezniy
Browse files Browse the repository at this point in the history
  • Loading branch information
pitbulk committed Jun 4, 2014
1 parent c083a46 commit d53c3ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion demo2/consume.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

try {
if (isset($_POST['SAMLResponse'])) {
$samlResponse = new OneLogin_Saml2_Response($settings, $_POST['SAMLResponse']);
$samlSettings = new OneLogin_Saml2_Settings();
$samlResponse = new OneLogin_Saml2_Response($samlSettings, $_POST['SAMLResponse']);
if ($samlResponse->isValid()) {
echo 'You are: ' . $samlResponse->getNameId() . '<br>';
$attributes = $samlResponse->getAttributes();
Expand Down
6 changes: 3 additions & 3 deletions demo2/slo.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

require_once '../_toolkit_loader.php';

$settings = new OneLogin_Saml2_Settings();
$samlSettings = new OneLogin_Saml2_Settings();

$idpData = $settings->getIdPData();
$idpData = $samlSettings->getIdPData();
if (isset($idpData['singleLogoutService']) && isset($idpData['singleLogoutService']['url'])) {
$sloUrl = $idpData['singleLogoutService']['url'];
} else {
throw new Exception("The IdP does not support Single Log Out");
}

$logoutRequest = new OneLogin_Saml2_LogoutRequest($settings);
$logoutRequest = new OneLogin_Saml2_LogoutRequest($samlSettings);
$samlRequest = $logoutRequest->getRequest();

$parameters = array('SAMLRequest' => $samlRequest);
Expand Down

0 comments on commit d53c3ea

Please sign in to comment.