56 if (isset(
$_POST[
'home_organization_selection'])) {
63 if (isset(
$_POST[
'idp_selection']) AND
64 $_POST[
'idp_selection'] !=
'-' AND isset($this->idp_list[
$_POST[
'idp_selection']])
67 $this->selected_idp = $_POST[
'idp_selection'];
110 if (! $this->idp_list) {
117 if (count($idp_cookie) > 0 AND isset($arr_idp_list[end($idp_cookie)])) {
118 $selectedIDP = end($idp_cookie);
120 <select name="idp_selection">
121 <option value="-">' .
$lng->txt(
"shib_member_of") .
'</option>';
124 <select name="idp_selection">
125 <option value="-" selected="selected">' .
$lng->txt(
"shib_member_of") .
'</option>';
127 foreach ($arr_idp_list as $idp_id => $idp_data) {
128 if ($idp_id == $selectedIDP) {
129 $selectElement .=
'<option value="' . $idp_id .
'" selected="selected">' . $idp_data[0] .
'</option>';
131 $selectElement .=
'<option value="' . $idp_id .
'">' . $idp_data[0] .
'</option>';
137 return $selectElement;
145 if (! $this->idp_list) {
151 $target = trim(ILIAS_HTTP_PATH,
'/') .
'/shib_login.php?target=' .
$_POST[
"il_target"];
153 if (isset($idp_data[1])) {
154 ilUtil::redirect($idp_data[1] .
'?providerId=' . urlencode($this->selected_idp) .
'&target='
155 . urlencode($target));
159 ilUtil::redirect(
'/Shibboleth.sso?providerId=' . urlencode($this->selected_idp) .
'&target='
160 . urlencode($target));
175 setcookie(
'_saml_idp', $this->
generateCookieValue($arr_idps), time() + (100 * 24 * 3600),
'/');
188 return $lng->txt(
"shib_invalid_home_organization");
200 $idp_raw_list = split(
"\n", $ilSetting->get(
"shib_idp_list"));
201 foreach ($idp_raw_list as $idp_line) {
202 $idp_data = split(
',', $idp_line);
203 if (isset($idp_data[2])) {
204 $idp_list[trim($idp_data[0])] = array( trim($idp_data[1]), trim($idp_data[2]) );
205 } elseif (isset($idp_data[1])) {
206 $idp_list[trim($idp_data[0])] = array( trim($idp_data[1]) );
222 $arr_cookie = explode(
' ', $value);
223 $arr_cookie = array_map(
'base64_decode', $arr_cookie);
237 $arr_cookie = array_map(
'base64_encode', $arr_cookie);
238 $value = implode(
' ', $arr_cookie);
253 array_push($arr_cookie, $value);
254 $arr_cookie = array_reverse($arr_cookie);
255 $arr_cookie = array_unique($arr_cookie);
256 $arr_cookie = array_reverse($arr_cookie);