43 if (isset(
$_POST[
'home_organization_selection']))
55 isset(
$_POST[
'idp_selection'])
56 &&
$_POST[
'idp_selection'] !=
'-'
57 && isset($this->IDPList[
$_POST[
'idp_selection']])
61 $this->selectedIDP = $_POST[
'idp_selection'];
106 if (count($idp_cookie) > 0 && isset($idp_list[end($idp_cookie)]))
110 <select name="idp_selection">
111 <option value="-">'.$lng->txt(
"shib_member_of").
'</option>';
116 <select name="idp_selection">
117 <option value="-" selected="selected">'.$lng->txt(
"shib_member_of").
'</option>';
120 foreach ($idp_list as $idp_id => $idp_data){
124 $selectElement .=
'<option value="'.$idp_id.
'" selected="selected">'.$idp_data[0].
'</option>';
128 $selectElement .=
'<option value="'.$idp_id.
'">'.$idp_data[0].
'</option>';
135 return $selectElement;
152 $target = trim(ILIAS_HTTP_PATH,
'/').
'/shib_login.php?target='.
$_POST[
"il_target"];
155 if (isset($idp_data[1]))
157 ilUtil::redirect($idp_data[1].
'?providerId='.urlencode($this->selectedIDP).
'&target='.urlencode($target));
163 ilUtil::redirect(
'/Shibboleth.sso?providerId='.urlencode($this->selectedIDP).
'&target='.urlencode($target));
181 setcookie (
'_saml_idp', $this->
generateCookieValue($IDPArray), time() + (100*24*3600),
'/');
195 return $lng->txt(
"shib_invalid_home_organization");
206 $idp_raw_list = split(
"\n", $ilSetting->get(
"shib_idp_list"));
208 foreach ($idp_raw_list as $idp_line){
209 $idp_data = split(
',', $idp_line);
210 if (isset($idp_data[2]))
212 $idp_list[trim($idp_data[0])] = array(trim($idp_data[1]),trim($idp_data[2]));
214 elseif(isset($idp_data[1]))
216 $idp_list[trim($idp_data[0])] = array(trim($idp_data[1]));
221 print_r($idp_list);
exit;
229 $CookieArray = split(
' ', $value);
230 $CookieArray = array_map(
'base64_decode', $CookieArray);
240 $CookieArray = array_map(
'base64_encode', $CookieArray);
241 $value = implode(
' ', $CookieArray);
249 array_push($CookieArray, $value);
250 $CookieArray = array_reverse($CookieArray);
251 $CookieArray = array_unique($CookieArray);
252 $CookieArray = array_reverse($CookieArray);