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));
161 ilUtil::redirect(
'/Shibboleth.sso?providerId='.urlencode($this->selectedIDP).
'&target='.urlencode($target));
179 setcookie (
'_saml_idp', $this->
generateCookieValue($IDPArray), time() + (100*24*3600),
'/');
193 return $lng->txt(
"shib_invalid_home_organization");
204 $idp_raw_list = split(
"\n", $ilSetting->get(
"shib_idp_list"));
206 foreach ($idp_raw_list as $idp_line){
207 $idp_data = split(
',', $idp_line);
208 if (isset($idp_data[2]))
210 $idp_list[trim($idp_data[0])] = array(trim($idp_data[1]),trim($idp_data[2]));
212 elseif(isset($idp_data[1]))
214 $idp_list[trim($idp_data[0])] = array(trim($idp_data[1]));
219 print_r($idp_list);
exit;
227 $CookieArray = split(
' ', $value);
228 $CookieArray = array_map(
'base64_decode', $CookieArray);
238 $CookieArray = array_map(
'base64_encode', $CookieArray);
239 $value = implode(
' ', $CookieArray);
247 array_push($CookieArray, $value);
248 $CookieArray = array_reverse($CookieArray);
249 $CookieArray = array_unique($CookieArray);
250 $CookieArray = array_reverse($CookieArray);