From 6132c69c1beae99a02a1aa28f18aca620a1ebe95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Wed, 28 May 2008 08:06:33 +0000 Subject: [PATCH] Sending authid and protocol from shib sso service as well. some cleanup git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@583 44740490-163a-0410-bde0-09ae8108e29a --- www/saml2/idp/SSOService.php | 3 +-- www/shib13/idp/SSOService.php | 13 ++++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/www/saml2/idp/SSOService.php b/www/saml2/idp/SSOService.php index 10345193e..510faba41 100644 --- a/www/saml2/idp/SSOService.php +++ b/www/saml2/idp/SSOService.php @@ -187,8 +187,7 @@ if($needAuth && !$isPassive) { $authId = SimpleSAML_Utilities::generateID(); $session->setAuthnRequest('saml2', $authId, $requestcache); - $redirectTo = SimpleSAML_Utilities::selfURLNoQuery() . - '?RequestID=' . urlencode($authId); + $redirectTo = SimpleSAML_Utilities::selfURLNoQuery() . '?RequestID=' . urlencode($authId); $authurl = '/' . $config->getBaseURL() . $idpmetadata['auth']; SimpleSAML_Utilities::redirect($authurl, array( diff --git a/www/shib13/idp/SSOService.php b/www/shib13/idp/SSOService.php index d4f84ebf2..be2c9f507 100644 --- a/www/shib13/idp/SSOService.php +++ b/www/shib13/idp/SSOService.php @@ -123,11 +123,14 @@ if (!$session->isAuthenticated($authority) ) { $authId = SimpleSAML_Utilities::generateID(); $session->setAuthnRequest('shib13', $authId, $requestcache); - - $relaystate = SimpleSAML_Utilities::selfURLNoQuery() . '?RequestID=' . urlencode($authId); - $authurl = SimpleSAML_Utilities::addURLparameter('/' . $config->getBaseURL() . $idpmetadata['auth'], - 'RelayState=' . urlencode($relaystate)); - SimpleSAML_Utilities::redirect($authurl); + $redirectTo = SimpleSAML_Utilities::selfURLNoQuery() . '?RequestID=' . urlencode($authId); + $authurl = '/' . $config->getBaseURL() . $idpmetadata['auth']; + + SimpleSAML_Utilities::redirect($authurl, array( + 'RelayState' => $redirectTo, + 'AuthId' => $authId, + 'protocol' => 'shib13', + )); /* -- GitLab